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
snarfed opened this Issue Dec 14, 2014 · 9 comments

Comments

Projects
None yet
4 participants
@snarfed
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

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Dec 14, 2014

Owner

related to #318.

Owner

snarfed commented Dec 14, 2014

related to #318.

@tantek

This comment has been minimized.

Show comment
Hide comment
@tantek

tantek Sep 5, 2015

Contributor

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

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 from facebook publish: support location (aka check-ins) to publish: support location Sep 5, 2015

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed
Owner

snarfed commented Sep 5, 2015

@petermolnar

This comment has been minimized.

Show comment
Hide comment
@petermolnar

petermolnar Jan 5, 2016

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);

petermolnar commented Jan 5, 2016

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

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Jan 7, 2016

Collaborator

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

Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Jan 7, 2016

Owner

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?

Owner

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

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Jan 7, 2016

Collaborator

.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

Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Jan 7, 2016

Collaborator

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)

Collaborator

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 from publish: support location to publish: support location (facebook venues) Apr 6, 2016

@snarfed snarfed changed the title from publish: support location (facebook venues) to publish: support location (not in Facebook API) Jul 25, 2017

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Apr 26, 2018

Owner

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

Owner

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 Apr 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment