skip to Main Content

I am building an application in flutter where you can click on someone’s name and it’ll redirect you to his profile, and I thought of using user’s facebook username or id.
From what I learnt, facebook username is no longer available through facebook graph api, and the id you get is app-scoped id that differs from real facebook id. The only thing I found regarding this issue was the link field through the graph api, but it requires app review, which I don’t completely understand how it’s done, but even if I had access to the link, it says that it’s only available if that person is your friend on facebook, which contradicts with the purpose of my app, is there any way to achieve this goal? I know it seems duplicated, but I only found really old answers and nothing actually helpful.

2

Answers


  1. Chosen as BEST ANSWER

    Looks like you can retrieve the user_link and other permissions through the facebook api, it still requires App Review.


  2. I would recommend using url_launcher. You can use FB ID finder to find the ID.

    Then you can launch the facebook app by passing the FB ID into it (fbUrl = the FB ID and fallbackUrl = the normal FB link which is used incase the user doesnt have FB app installed):

    Future<void> _launchFacebook (String fbUrl, String fallbackUrl) async {
        try{
          bool launched = await launch(fbUrl);
          if(!launched){
            await launch(fallbackUrl);
          }
        }
        catch(e){
          await launch(fallbackUrl);
        }
      }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search