I have obtained advanced access to Facebook's Graph API user_link, which results in an app-scoped ID accessible only to the logged-in user.
The user_link document clearly states:
The allowed usage for this permission is to provide a way for someone who uses your app to visit a person's Facebook profile.
But ASID fails to do that. So, what am I missing here? And, is there a workaround if this is how it will be, other than manually entering the URL?
My code:
$response = $fb->get('/me?fields=id,name,email,link', $accessToken);
$user = $response->getGraphUser();
$_SESSION['fb_link'] = isset($user['link']) ? $user['link'] : '';
Update:
User A account has Fb icon that redirects to their Fb profile using the link https://www.facebook.com/app_scoped_user_id/YXNpZADpBWEZA4a281N3FmRDBNX25UUTYweEhicGNGs1RUhYa3lKTks3cm1ZATmk0eXNXZAUFTbHVEbjFKSkJpTFhQT05FcDBDSUhOdUJKc0xEVFhER1diTGZAZAWE5BUDF0QVEZD/. When User A (or User A's Facebook friends who are on my platform) clicks it, the link redirects to successfully to User A's Fb profile, but for other users on my network even if they are logged-in, they see a failure message on a Facebook page "Sorry, this content isn't available at the moment".
I hope this clarifies any doubts. Any leads will be appreciated. Thank you!
$user['link']contains a URL but that the URL isn't usable? If so, what happens when someone tries to visit the link? You haven't quite explained what is in there, or how you tried to use it. Can you edit the question? Thanks