Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

react native FaceBook SDK get token for IOS is returning wrong signature

$
0
0

I am using the latest Facebook SDK react-native-fbsdk-next, I managed to make it work for Android, but it is not working for IOS

            LoginManager.logInWithPermissions(['public_profile','instagram_basic','instagram_manage_insights','pages_show_list','ads_management','business_management','ads_read','read_insights',            ]).then(              (result: any) => {                if (result.isCancelled) {                  console.log('Login cancelled');                } else {                  if (Platform.OS === 'ios') {                    AuthenticationToken.getAuthenticationTokenIOS().then(                      (data: any) => {                        console.log('after get accress token ',                          data?.authenticationToken.toString(),                        );                        console.log('Login success with permissions: '+                            result.grantedPermissions.toString(),                        );                        //data.accessToken.toString()                        dispatch(fetchPages(data?.authenticationToken));                      },                    );                  }

I am getting a token, but when ever I try to use it to fetch pages, I get wrong signature.Any suggestions what might be the error? what I'm doing wrong.

const manager = new GraphRequestManager();    const igAccountFields ='instagram_business_account{id,name,username,profile_picture_url},id,username,name,tasks,category,access_token';    const req = new GraphRequest('/me/accounts',      {        httpMethod: 'GET',        accessToken: accessToken,        parameters: {          fields: {            string: igAccountFields,          },        },      },      _responseInfoCallback,    );    manager.addRequest(req);    manager.start();```

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>