正常にログオンした後、ユーザーのFacebookプロフィールを取得する予定のIonic 2アプリにコードスニペットがあります。私は/me/picture
に要求パスを設定する場合しかし、私はエラーを取得し、ユーザーに関連付けられた要求パス/me
データを返しますことを確認しました:ここThere was an error making the graph call.
Ionic 2ネイティブFacebookプラグインのエラーを取得するときユーザープロフィールの画像
は私のコードです:
if(this.platform.is('cordova')) {
Facebook.login([
'public_profile',
'user_friends',
'email'
]).then((result) => {
Facebook.api('/me?fields=id,name,email,cover', []).then(data => {
// Create the user object
let user = {
access_token: result.authResponse.accessToken,
display_name: data.name,
email: data.email,
facebook_id: data.id,
cover_photo: data.cover.source,
}
Facebook.api(`me/picture`, []).then(data => {
user['profile_photo'] = data.url;
this.loginWithFacebook(user);
}, error => { this.user = JSON.stringify(error)});
})
},
error => {
this.user = JSON.stringify(error);
})
}
は、私は何かが欠けている?私は/{user-id}/picture
をやってみましたが、まだエラーが表示されます。誰でもこの問題にぶつかりますか?
あなたは聖人です。それは完全に働いた:) –