{"action":"created","issue":{"url":"https://api.github.com/repos/snarfed/bridgy/issues/447","labels_url":"https://api.github.com/repos/snarfed/bridgy/issues/447/labels{/name}","comments_url":"https://api.github.com/repos/snarfed/bridgy/issues/447/comments","events_url":"https://api.github.com/repos/snarfed/bridgy/issues/447/events","html_url":"https://github.com/snarfed/bridgy/issues/447","id":102275338,"number":447,"title":"facebook no longer gives us usernames, which breaks OPD","user":{"login":"snarfed","id":778068,"avatar_url":"https://avatars.githubusercontent.com/u/778068?v=3","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/snarfed/bridgy/labels/listen","name":"listen","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-21T01:37:31Z","updated_at":"2015-08-21T01:42:28Z","closed_at":null,"body":"...at least for syndication links with usernames, e.g. https://www.facebook.com/snarfed.org/posts/10100929680893833 , which may be the majority. similar/related to #375 and #350.\r\n\r\nhere's an example user object that FB currently gives us with the v2.2 API:\r\n\r\n```json\r\n{\r\n   \"name\" : \"Ryan Barrett\",\r\n   \"gender\" : \"male\",\r\n   \"id\" : \"212038\",\r\n   \"website\" : \"https://snarfed.org/\",\r\n   \"first_name\" : \"Ryan\",\r\n   \"last_name\" : \"Barrett\",\r\n   \"locale\" : \"en_US\",\r\n   \"verified\" : true,\r\n   \"updated_time\" : \"2015-06-06T07:29:11+0000\",\r\n   \"timezone\" : -7,\r\n   \"link\" : \"http://www.facebook.com/212038\"\r\n}\r\n```\r\n\r\nmy username is `snarfed.org`, which isn't mentioned there. (the `link` field doesn't count. :P)\r\n\r\noptions:\r\n* do a `HEAD` request on the `link` field and follow redirects until we get to `facebook.com/USERNAME`, which is the final location.\r\n* see if we can look up the username somehow. maybe FB just wants us to request it specifically with `?fields`?\r\n\r\nnote that those options only work for global user ids, not app scoped user ids. new users who authed with us after we ported to the v2.0 API are just SOL."},"comment":{"url":"https://api.github.com/repos/snarfed/bridgy/issues/comments/133241829","html_url":"https://github.com/snarfed/bridgy/issues/447#issuecomment-133241829","issue_url":"https://api.github.com/repos/snarfed/bridgy/issues/447","id":133241829,"user":{"login":"snarfed","id":778068,"avatar_url":"https://avatars.githubusercontent.com/u/778068?v=3","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T01:42:28Z","updated_at":"2015-08-21T01:42:28Z","body":"i should also document in /about that syndication urls with usernames won't work for new users. :/"}}