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

publish: support location (not in Facebook API) #317

Closed
2 of 3 tasks
snarfed opened this issue Dec 14, 2014 · 9 comments
Closed
2 of 3 tasks

publish: support location (not in Facebook API) #317

snarfed opened this issue Dec 14, 2014 · 9 comments
Labels

Comments

@snarfed
Copy link
Owner

snarfed commented Dec 14, 2014

looks like we'd just need to convert p-location and/or u-checkin to the place param in the/user/feed POST.

https://developers.facebook.com/docs/graph-api/reference/v2.2/user/feed

(thanks for not mentioning that I hand waved past a hard part or two there. nice of you. :P)

status:

@snarfed
Copy link
Owner Author

snarfed commented Dec 14, 2014

related to #318.

@tantek
Copy link
Contributor

tantek commented Sep 5, 2015

I think this would be useful as an aspect of any post type, not just "check-ins". E.g. notes have locations, photos have locations etc. similar to making #459 apply to more than just photos.

Encountered need: http://indiewebcamp.com/irc/2015-09-01/line/1441139465398

@snarfed snarfed changed the title facebook publish: support location (aka check-ins) Sep 5, 2015
@snarfed
Copy link
Owner Author

snarfed commented Sep 5, 2015

@petermolnar
Copy link

for Flickr, I suggest looking for a h-geo tag, as Flickr accepts latitude/longitude.

This is a snippet from a PHP code that does this for Flickr:

$params = array (
        'format' => 'php_serial',
        'method'=>'flickr.photos.geo.setLocation',
        'photo_id'=>$phiID,
        'lat'=>$latitude,
        'lon'=>$longitude,
);

$oauth->makeReq('https://api.flickr.com/services/rest/',$params);
kylewm added a commit to kylewm/granary that referenced this issue Jan 6, 2016
kylewm added a commit to kylewm/granary that referenced this issue Jan 6, 2016
@kylewm
Copy link
Contributor

kylewm commented Jan 7, 2016

@petermolnar I pushed some changes that should make this work for Flickr. Could you test it when you have a chance? Thanks!

@snarfed
Copy link
Owner Author

snarfed commented Jan 7, 2016

the catch with facebook that i hand waved past initially is that we have to use a location from their database. specifically, we'd search for candidates, choose one somehow, and includes its id in the place param with our publish call.

the "choose one" part is the hard part. it implies UI, or at least multiple round trips and more interface functionality in bridgy publish, which we're trying to avoid. @kylewm mentioned that he started down this road in silo.pub and hit the same difficulties.

we could do it if they include a link to the facebook place page in their post, though. something like .p-location.u-url? afaik that mf2 doesn't actually make sense, but something similar?

@kylewm
Copy link
Contributor

kylewm commented Jan 7, 2016

.u-location or .p-location.h-card > .u-url would work

A tiny bit of exploration, some place URLs are like

https://www.facebook.com/The-Creamery-276261304155/ or
https://www.facebook.com/Kathys-Kreative-Kakes-139715692377/

The place ID is predictably the # after the slug.

Some are like https://www.facebook.com/bstreetandvine (this seems rare, I wonder if they were grandfathered in)

Where you can request graph.facebook.com/v2.5/bstreetandvine and get

{
  "name": "B Street and Vine",
  "id": "141366356825"
}

When creating a POST, setting the "place" field to this ID seems to work (although it makes it look like a big stupid checkin instead of a simple post with a location) e.g.

big-stupid-checkin

kylewm added a commit to kylewm/granary that referenced this issue Jan 7, 2016
@kylewm
Copy link
Contributor

kylewm commented Jan 7, 2016

Also, for reference I tried to implement place/location for Facebook in silo.pub

I used https://graph.facebook.com/v2.5/search?type=place&center=lat,lng&distance=500&q=place_name which is actually pretty decent PROVIDED you have a place_name. If you don't, it'll check you in to the nearest venue of any kind (in my case it was a massage place)

@snarfed snarfed changed the title publish: support location Apr 6, 2016
@snarfed snarfed changed the title publish: support location (facebook venues) Jul 25, 2017
@snarfed
Copy link
Owner Author

snarfed commented Apr 26, 2018

bridgy publish for facebook will disappear soon (#817), so I'm closing open issues for it. sad. feel free to holler if you disagree.

@snarfed snarfed closed this as completed Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants