Hi, i'm using the code bellow to retrieve user profile information, but isn't working, please check:
(Obvious this code is implemented after users login with sucess, i checked and the login with facebook work fine, but this function return blank value and my facebook app have permission to access fullname and email);
var
fb : TFacebookProfile;
begin
fb := TFacebookProfile.Create;
if assigned(fb) then
try
Showmessage('Nome: '+fb.FullName);
Showmessage('Email: '+fb.Email);
except
on e : exception
do
showmessage('Erro: '+e.Message);
end;
end;
Also in facebook demo project retrieve user friend list doesn't work:
var
I: Integer;
begin
TMSFMXCloudFacebook1.GetFriends;
ListBox1.BeginUpdate;
for I := 0 to TMSFMXCloudFacebook1.FriendList.Count - 1 do
I checked. Yes and yes. Also i run the demo project and the function to get friendlist also isn't working once my app have the following permissions:
email
Provides access to the person's primary email address. This permission is approved by default.
<div -="tooltip" _5sy1="" id="u_0_14" aria-label="Live and available to all users" style="border-radius: 5px; display: inline-block; height: 10px; line-height: 10px; padding: 0px; width: 10px; margin-right: 8px; : relative; top: 1px; : rgb70, 168, 0;">
public_profile
Provides access to a person's basic information, including first name, last name, profile picture, gender and age range. This permission is approved by default.
<div -="tooltip" _5sy1="" id="u_0_15" aria-label="Live and available to all users" style="border-radius: 5px; display: inline-block; height: 10px; line-height: 10px; padding: 0px; width: 10px; margin-right: 8px; : relative; top: 1px; : rgb70, 168, 0;">
user_friends
Provides access to a person's list of friends that also use your app. This permission is approved by default.
Thanks for the info. I don't know if this fix will allow me to retrieve photos from friends, but if so, that is an excellent feature I can use in my current project!
I am still having the same problem with version 2.9.0.0. Still can't access Facebook friendslist after replacing all Chromium FMX in all areas including samples.
Sorry, wrong component (I was looking at the TMS Pack for FireMonkey version. I did install (including Chromium, replacing source) version 2.3.1.2 of TMS Cloud Pack for FireMonkey, and I am still getting the same problem with not getting any friends when using:
TMSFMXCloudFacebook1.GetFriends(TMSFMXCloudFacebook1.Profile.ID); (or without Profile ID)
for I := 0 to TMSFMXCloudFacebook1.FriendList.Count - 1 do
The count is zero, and nothing gets loaded in the Listbox. If you are able to see results in a test on your side, the only thing I can think of that is wrong is permissions, which I am using email, Friendslist, read friendslist, etc. I have tried different permissions. My app Share Stuff is public, but I haven't requested a Facebook review.
If you have the property APIVersion set to av21: Please note that with the Facebook API v2.1 or later, only friends that have also authorized the application will be retrieved. With APIVersion set to v10, you should be able to retrieve the full friends list of the authenticated user.
- If the problem persists, can you please run the FacebookDemo on Windows with logging enabled, then provide the LOG file generated in the Documents folder so I can further investigate this?
Unfortunately, APIVersion is defaulted to v10 when adding the component to a form and on the samples so everything has been and today with v10, but no one has authorized this app, so that would explain it. Maybe I need to get it authorized? I have two user profiles in facebook with separate email addresses. I still get zero on the friendslist count even though there are friends for my profile. The log file generated is : TTMSFMXCloudFaceBook.log.