Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow one click 'import' from google my business API; facebook site API #19

Open
CloCkWeRX opened this issue Feb 17, 2017 · 4 comments
Open

Comments

@CloCkWeRX
Copy link
Contributor

  1. User logs in via oauth
  2. Clicks 'submit my data from google/facebook business listing' and 'I am authorised to license this data via the ODBL' (or similar)
  3. OnOSM hits https://developers.google.com/my-business/ and https://developers.facebook.com/docs/pages to find existing details

Reasoning: its very easy for small businesses to add themselves to google or facebook - some are skipping even websites in favour of a facebook page.
People are more likely to contribute their data to OSM if it is trivial to sync from data they have already keyed in elsewhere.

@CloCkWeRX
Copy link
Contributor Author

#3

@CloCkWeRX
Copy link
Contributor Author

So Facebook's graph API makes this pretty easy

image

I might have a go at the oauth steps

GET /2.8/PortExpressTakeaway/?fields=id,name,about,single_line_address,website,is_always_open,payment_options,hours,location,category,category_list,company_overview,description,general_info,is_permanently_closed,link,parking,phone,place_type,public_transit,store_location_descriptor

produces

{
  "id": "558600187674566",
  "name": "Port Express Takeaway",
  "about": "Snack Bar, food, Vietnamese Bread Roll
Coffee
Fish and CHips",
  "single_line_address": "95 Victoria Road, Birkenhead, South Australia 5010",
  "is_always_open": false,
  "location": {
    "city": "Birkenhead",
    "country": "Australia",
    "latitude": -34.83353,
    "longitude": 138.50144,
    "state": "SA",
    "street": "95 Victoria Road",
    "zip": "5010"
  },
  "category": "Local Business",
  "category_list": [
    {
      "id": "167608369957681",
      "name": "Fish & Chips Restaurant"
    },
    {
      "id": "1802051720039034",
      "name": "Food Delivery Service"
    },
    {
      "id": "201035296584114",
      "name": "Internet Cafe"
    }
  ],
  "is_permanently_closed": false,
  "link": "https://www.facebook.com/PortExpressTakeaway/",
  "phone": "08 8249 9472",
  "place_type": "PLACE"
}

@iandees
Copy link
Member

iandees commented Feb 18, 2017

Hmm, interesting. It's probably against the Facebook TOU to grab their data, but if it's the store owner suggesting it then maybe it's ok.

@CloCkWeRX
Copy link
Contributor Author

Yeah, I did intend for it to only be your own business - the owner would have the ability to release that info under a compatible license.

Annoyingly, finding out if a facebook user owns a page requires extended permissions (http://stackoverflow.com/questions/2966015/facebook-get-list-of-pages-that-a-user-is-admin-of); so for the short term I've gone for the simplest thing that can work - take the user's word that they are the owner.

ArcaneDots pushed a commit to ArcaneDots/onosm.org that referenced this issue Dec 22, 2022
* Add Esri layer

* Update site.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants