TMSFMXCloudFacebook doesn't retrive information

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
    ListBox1.Items.AddObject(TMSFMXCloudFacebook1.FriendList.Items.FullName, TMSFMXCloudFacebook1.FriendList.Items);
  ListBox1.EndUpdate;
end;

None information back, instead of first problem i believe in this case my application have not permission to access friend list.

UPDATE:

I add some stuff in my code and now show the name, but still don't show the email address.

var
   fb : TFacebookProfile;
begin
    fb := TFacebookProfile.Create;
    TMSFMXCloudFacebook1.GetProfileInfo('/me', fb);
    TMSFMXCloudFacebook1.GetProfileInfo('email', fb);
    if assigned(fb) then
    try
    Form82.Label12.Text :='Nome: '+fb.FullName;
    Form82.Label15.Text :='Email: '+fb.Email;
   except
  on e : exception
    do
  showmessage('Erro: '+e.Message);
    end;
end;
  1. Did you add the scope 'email' to scopes list?
    2) Did you ask permission to get access to the users email?

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.

Do you see the user email on the Facebook page itself?

I can't get the friendlist to work. Using   TMSFMXCloudFacebook1.GetFriends(TMSFMXCloudFacebook1.Profile.ID);

or
  TMSFMXCloudFacebook1.GetFriends;
If I could get photos and Comments from Friends posted into my apps, this would provide many features making apps more sellable.



Hi,

In some scenarios the GetFriends call did not work due to an issue with retrieving the Access Token.
This issue has now been fixed.
The update will be available with the next release of the TMS Cloud Pack for FireMonkey.

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!

You can retrieve the available photo albums from a user with the GetAlbums call.

Example:
  AdvFacebook1.GetAlbums(AdvFacebook1.FriendList[Index].ID);

Please see the FacebookAlbumDemo for a full sample.

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.

Can you please make sure you are using the latest version (v2.3.1.2, released on MAR 12, 2015) of the TMS Cloud Pack for FireMonkey? 

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
    ListBox1.Items.AddObject(TMSFMXCloudFacebook1.FriendList.Items.FullName, TMSFMXCloudFacebook1.FriendList.Items);
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?

    To enable logging:
      TMSFMXCloudFacebook1.Logging := true;
      TMSFMXCloudFacebook1.LogLevel := llDetail;

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. 

Where do I send this?

You can send the log file to help@tmssoftware.com
Bart Holvoet2015-03-23 08:37:15