Facebook Login


I'm struggling to get facebook login working. I think I have configured everything correctly but I never get a facebook login screen, it just says not logged in. The facebook app has not yet been submitted for review. I have also tried adding a test account but the result is the same.

Also coulld you please explain how the App.CallbackURL property should be used as this is not mentioned in your documentation.



Did you follow all steps to get your application key and secret explained at:

and the call back URL in your app settings should match the redirect URI setup in your Facebook app setting.
Also, if you do not properly see the Facebook login screen, can you verify you effectively use the latest version of our Cloud Pack.
If a problem persists, please provide also feedback on the operating system you use as you do not inform about this.

Thanks. I was looking in the PDF not at the link you gave. I can confirm that it works given the details you provided. It is amazing just how bad (and complex) the facebook documentation on their site is. Rather than use your PersistTokens settings to store the token in an ini file or datasource I would like to do this myself. What event should I use?

Further to this I cannot get the loading of friends to work on any platform, even using your test app and my credentials. I am using cloud pack I can connect fine.

When I debug:

          ja := jva as TJSONArray;           <------- This line skips even though I can see that there are 35 friends

          for i := 0 to GetArraySize(ja) - 1 do
            jo := GetArrayItem(ja,i) as TJSONObject;
            with FFriendList.Add do
              FullName := GetJSONProp(jo,'name');
              ID := GetJSONProp(jo,'id');

          job := GetJSONValue(jv as TJSONObject, 'summary') AS TJSONObject; <--------- down to here
          if Assigned(job) then
            FFriendsCount := StrToInt(GetJSONProp(job,'total_count'));

If I change this line:
  url := ApiBase + '/' + UserID + '/friends?fields=id,name&access_token='  + Token_Auth;
to be:
  url := ApiBase + '/' + UserID + '/taggable_friends?fields=id,name&access_token='  + Token_Auth;
in procedure TTMSFMXCloudCustomFacebook.GetFriends(UserID: String = '');
It works.


You can use the TokensAsString property if you want to manually store the tokens.
Tokens are available if the OnConnected or OnReceivedAcessToken event is triggered.

- We are not aware of any issues with the GetFriends call.
Please note however that the list of friends that can be retrieved is limited to Facebook accounts who have authorized the Facebook App you are using.
This is a limitation of the Facebook API which we have no control over.

- We'll consider adding support to retrieve the list of taggable friends in a future version.
Thank you for your suggestion.

Thanks. What I really want to be able to use is the facebook invitable friends api.

We'll have to investigate if support for the Facebook invitable friends API can be added in a future version of the TMS FMX Cloud Pack.

Thanks. That would be appreciated.