In v1.0 API I was able to get friends with their facebook ID like this:
{
"name": "Somename SomeSurname",
"id": "100007797060798"
}
In the v2.0 I can use only taggable_friends to get this information, however `i must have missed something in the documentation, because the id I'm getting is like this (id is always different):
{
"id": "AaKJ-QN8OlY3m-2DHeVnc5oQZFnx_V0ptUF8XFEstr3EcS1LltvAx0_xptve3DWc_vI1zP0s4RhVMOTk1EqDvzCHMkEqFRMIkuXtyXe5d9O1-Q",
"name": "Somename someSurname"
}
can someone point me where I can retrieve a real ID out of this?
With the Facebook Graph API, you can access a wide range of user data, including user information such as name, email address, birthday, and friends list in JSON. You can also access information about pages that a user has liked or engaged with on Facebook, as well as events and photos that they have posted or shared.
You can review your information on Facebook (such as recent activity) from the Your Facebook Information section of your Facebook Settings. Tap in the top right of Facebook. Scroll down and tap Settings. Scroll down to Your Facebook Information and tap the information you want to review.
There is no way to get to id via taggable_friends endpoint.
https://developers.facebook.com/docs/apps/upgrading
/me/taggable_friends
shows all friends in the list except for some. In one case, there are 326 friends in a profile but this only shows 317 and in another profile there are 194 friends in total but it only shows 182.
$flist = $fb->api('/me/taggable_friends?fields=name,id&limit=1000');
shows almost all friends in the list (despite the limit being too high) but leaves some of them in both cases. This might not work on the api explorer if your app is not approved and published but it will work for admins, testers and developers of your application.
You cannot decode this id because that would defeat the purpose of encoding it in the first place.
What I am also wondering is that whether it is possible to invite friends of a user to use the application?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With