-
Notifications
You must be signed in to change notification settings - Fork 52
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
facebook: v2.0 api no longer allows lookup by username #350
Comments
Some dead ends...
|
here's a radical proposal: switch from the current POSSE model to PESOS. it would take a lot of work, but it would bring a lot of benefits. ...man oh man i wish i had the bandwidth right now to actually implement it! |
So I think I've found a reliable (for now) way to find someone's app scoped user id, but I still can't find a way to access those posts via the API. An unversioned, unauthenticated call to https://graph.facebook.com/stephanie.rodgers.980 gives their global user ID, then an unversioned, authenticated call to https://graph.facebook.com/4705326 gives a link to https://www.facebook.com/app_scoped_user_id/10100593893240028/ So, I have the user ID now: 10100593893240028. I had hoped that this would mean I could get /v2.2/10100593893240028_10100777887638778 both fail with the same error message. {
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100
}
} |
so infuriating, huh? regardless, interesting, nice find. i assume both calls are using the v1 api, since the URLs are unversioned. https://developers.facebook.com/docs/graph-api/reference/v2.1/user/ids_for_business might give us a v2.x alternative for the second part, but I suspect there's still no 2.x way to look up by username. sigh. |
@kylewm and i have been discussing euthanizing facebook liking and commenting entirely. :( i'm going to collect all the options here, no matter how crazy:
|
This wouldn't help us would it? The global user ID doesn't seem to refer to anything inside the API (unless that person has signed up for bridgy prior to the switch to the new API). |
And I think we should definitely post a question to SO either way... for posterity if nothing else. I'll donate 500 karma points or whatever to the bounty :) |
i think we can still use the global user id, or at least get somewhere with it. first, if i get a bridgy access token in the explorer and look up a global user id, e.g. https://developers.facebook.com/tools/explorer?method=GET&path=100000224384191 , that at least works. second, we just need a user id to attach to the object id to make a composite id that we can comment or like against, right? it seems like it should work. i know, fb api, yeah, right...but i'll try. |
let me know if you have better luck than i did... with user id 1740230476, app scoped id 4494578659463, and post id 10200383182099046, all 3 variations fail :( /v2.2/10200383182099046 |
here's a bunch more research and observations. this is basically just fodder for an eventual stack overflow question; no really new information or conclusions, sadly. a couple notes: the graph explorer links here use access tokens that include
|
yay, thank you! fingers crossed! |
we've sadly concluded that our research here is correct, and the way forward is to shut down bridgy publish support for facebook likes and comments. sad day in indiewebland. :/ props and thanks to @kylewm for his help with this! |
This is so sad :( |
@julien51 definitely a bummer, but just to be clear facebook backfeed and facebook publish for notes and articles both still work and show no signs of stopping :) there was some confusion about that in the channel yesterday. |
Ha! Indeed. But still, it upsets me when APIs are changed/removed unilaterally, but I guess there is a reason for using protocols, rather than APIs! |
If it helps, I'm using this to import comments/likes, but I do it by post: For me, it worked, but there are glitches. |
thanks @petermolnar! fortunately this bug only killed bridgy publish for FB. backfeed is still working fine. |
hi @petermolnar thanks from me too :) it looks like you're using the /v2.2/USERID_POSTID format to find posts from syndication links. there's two problems that break this approach for bridgy:
|
re #2, here's an example of code we use to try different id formats and merge the results (!) (:sob:): snarfed/granary@15b633e |
I wasn't aware of this earlier but I've read the conversation since. This is genuine madness from Facebook.
I've noticed that, especially with pretty old entries, like 2009. To be honest, I'm very close to the point to leave the whole sh*t behind, including Twitter with their ridiculously restricted API. |
huh. here's something interesting in the 2.4 API changelog (search for Declarative Fields):
they've supported the |
...or at least, that's what we think so far. irc discussion. i'm still trying to find an explicit confirmation in their docs. the upgrade guide and platform changelog say the username field was removed from user objects in responses, but nothing about looking up by username.
the problem is that for users with usernames, FB redirects their posts to URLs that use their username instead of their id, e.g. https://www.facebook.com/snarfed.org/posts/10100929680893833 . you can look up and write to some FB posts (like that one) by bare post id,
/10100929680893833
, but not others, e.g. https://www.facebook.com/ben.werdmuller/posts/10101055597765779 vs/10101055597765779
. we don't yet know what causes the difference.the latter ones work if you prefix the user id, e.g.
USERID_POSTID
. (username prefix doesn't work.) so we'd need to do that for publish to like/comment on/share them. however, we can't get the user id, so we're hosed. :(thanks to @kylewm for raising and pinpointing this.
The text was updated successfully, but these errors were encountered: