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();```