1

I have created facebook test user and this is user id '123277648572642' however I can't access the public profile using this url - facebook.com/123277648572642 what am I doing wrong?

Micky Chen
  • 11
  • 3
  • You are not supposed to be able to access user profiles in this way any more, test user or real … If you want a working link to a user’s profile, you have to ask them for permission first now. https://stackoverflow.com/q/51147807/1427878 – CBroe Jul 03 '18 at 14:30
  • @CBroe thanks for your information. so should I ask for additional permssion 'user_link' to get public profile? – Micky Chen Jul 03 '18 at 14:34
  • Yes, you need that permission, and then you can request the `link` field on the user object. You will get a URL of the form `https://www.facebook.com/app_scoped_user_id/{long_cryptic_token}/` (`app_scoped_user_id` as literal path component here, not replaced with the actual app-scoped id.) When followed by an actual user in a real browser, it will redirect to the real profile address. Those tokens are limited in validity though, I think, so you should not store those links for long-time use, they are likely to expire at some point. – CBroe Jul 03 '18 at 14:39
  • @CBroe I want to simply go to facebook user profile when click a picture on the app. which means it should be possible with facebook user id or something else which can be persist – Micky Chen Jul 03 '18 at 14:42
  • Used to be, but after the Cambridge Analytica story, it isn’t any more. Deal with it ;-), everyone else has to as well. – CBroe Jul 03 '18 at 14:45
  • @CBroe so there is no way to get permanent profile link anymore? – Micky Chen Jul 03 '18 at 14:53
  • No, there isn’t. – CBroe Jul 03 '18 at 14:56
  • Plse refer below blog: https://medium.com/@shrawan25.sharma/urgent-facebook-sdk-app-update-to-retain-permission-access-a256b76e5bd5 – Shrawan Jul 05 '18 at 19:43

1 Answers1

0

That's expected behaviour, from the Test Users documentation:

A test user is a special Facebook account, invisible to real accounts, which can be created within an app for the purpose of manual or automated testing of that app's Facebook integration.

(emphasis mine)

You should be able to log in as that user using the instructions in the documentation to add content, test if your app is working as expected, etc, but normal/real Facebook users can't see the profile, and you can't see it when logged out.

Igy
  • 43,710
  • 8
  • 89
  • 115
  • Thanks for your quick response, I even can't see real user's profile when logged in testing user. is it also expected? – Micky Chen Jul 03 '18 at 14:23
  • I am also seeing this 'A test user's data is only visible to other test users, and real users can not see test user data.' but I logged in as a test user, and trying to access another test user's profile, it gives same error – Micky Chen Jul 03 '18 at 14:27
  • Are the test user you're logged in as (let's call them A) and the one you're trying to view the profile of (let's call them B) both test users from the same application? Are A and B friends? If not, try to set that up first. I think a test user from an app should be able to see the profiles of other test users of the same app, but it's not clear from the documentation – Igy Jul 03 '18 at 14:41
  • Yes, both users are test users from same app. but they're not friends. they should be to see each other's profile? – Micky Chen Jul 03 '18 at 14:44
  • I'm not 100% sure, but it's something you should try; Test Users are restricted in many ways related to privacy and visibility, so perhaps they need to be friends in order to see each other's profiles – Igy Jul 03 '18 at 14:54