Hi,
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.
Thanks,
Ken
Did you follow all steps to get your application key and secret explained at:
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 3.2.0.1. 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
begin
jo := GetArrayItem(ja,i) as TJSONObject;
with FFriendList.Add do
begin
FullName := GetJSONProp(jo,'name');
ID := GetJSONProp(jo,'id');
end;
end;
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.
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.
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.