Facebook Friends request in sample app fails


When using your example application for Facebook, while I can get the feed and all, I can not retrieve the Friends.  No error, just 0 friends. In the log file it is blank as well.  I have tried the default v1 and v21.  Both do the same thing. I have also made sure there are 2 authorized users so even in v21 I should get at least 1 friend per account. 

I have seen this problem in other posts, so I downloaded and installed the current version and I still get the problem. Has there been an update to the VCL version of the Facebook component that fixes the friends problem?  Or will I always be a lonely person with no friends  ...



I have not been able to reproduce this issue with TMS Cloud Pack v2.9.0.0
In v2.7.0.0 there was a fix included for an issue that prevented the TAdvFacebook from retrieving an access token in some cases. If retrieving the feed is working this is most likely related to another issue.
Can you please enable logging for the TAdvFacebook control and provide the automatically generated log file in your documents folder after the problem has occurred so I can further investigate this?

Enable logging sample:
  AdvFacebook1.Logging := true;
  AdvFacebook1.LogLevel := llDetail;

Contents of log file.  For security reasons I have not included the actual Token, giving it as !TOKEN!.  In both cases these tokens are the same though. I checked.  !ALL OF MY DATA! is of course, all of my data. I can also get the feed just fine.  Only friends returns no data.

20150430T091051:HTTPS GET: https://graph.facebook.com/me?access_token=!TOKEN!
20150430T091051:HTTPS GET RESULT:{
20150430T091052:HTTPS GET: https://graph.facebook.com/me/friends?access_token=!TOKEN!
20150430T091052:HTTPS GET RESULT:{
   "data": [

This could be a permissions issue.

Can you make sure the Facebook App you are using has permission to retrieve the friend list?
You can see this in Facebook > Settings > Apps (see screenshot)

If not, can you try adding the "user_friends" permission to your "App Details" at https://developers.facebook.com/apps/ (click the "Configure App Center Permissions" button)?

user_friends is in my permission settings, but I do not see friends on the settings page. I removed the app from my facebook account and forced it to reinitialize the settings, but it still does not have Friend List.  On the developer page it says that I have auto approval for the Friends List, which means I don't have to submit, but it still doesn't help here it seems. What other settings should be in permission settings that may trip this problem?

Due to the changes in the Facebook API it is now required that the 'user_friends' scope is added to TAdvFacebook component before authorizing a Facebook App.
Please note that you will have to first remove the app from your Facebook account and then re-authorize it.


Yeah!  It finally works! Thanks for keeping on this problem!

NOTE: I did have to do a Scopes.Clear and add in 2.x valid permission settings when using it as a 2.x app or you get:

Invalid Scopes: publish_stream, read_friendlists, friends_hometown, friends_location, friends_likes, friends_website, friends_relationships, friends_photos, friends_birthday. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions