Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Ionic 3 cordova-plugin-facebook4 - There was an error making the graph call. (iOS Only | Android Working)

$
0
0

@rockfordbuzz wrote:

Using this plugin inside my Ionic 3 project… https://github.com/jeduan/cordova-plugin-facebook4

I’ve done my research and have followed the syntax steps in other issues that I’ve found online. However, I still continue to experience the same problem.

My API call is working in Android Studio, but gives me the generic error, “There was an error making the graph call”, in iOS. In Android, it posts to the proper business page just fine. iOS is the only place giving me the error.

Here is my Ionic Info…

cli packages: (/Users/jacobbradt/Documents/Version 3.0/Mobile App/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 7.0.1 

local packages:

@ionic/app-scripts : 3.0.1
Cordova Platforms  : android 6.2.3 ios 4.4.0
Ionic Framework    : ionic-angular 3.7.1

System:

ios-deploy : 1.9.1 
ios-sim    : 6.0.0 
Node       : v6.11.1
npm        : 3.10.10 
OS         : macOS High Sierra
Xcode      : Xcode 9.4.1 Build version 9F2000 

Below is my function for making the API call using the plugin. Any help would be appreciated. Please note that I’m making an API call to access a Business Page and not a User Account.

this.fb.api(this.requestData.facebook_id + "/?fields=access_token",["manage_pages","publish_pages"])
              .then(res => {
                let access_token = res.access_token;

                let facebookString = this.requestData.facebook_id + "/feed/?fields=id" + "&method=post" + "&link=" + link
                if(this.post.facebook_message != null && this.post.facebook_message != ""){
                  facebookString += "&message=" + this.post.facebook_message;
                }
                facebookString += "&access_token=" + access_token;

                this.fb.api(facebookString,["manage_pages","publish_pages"])
                  .then(res => {
                    this.loading.dismissAll();
                    this.viewCtrl.dismiss('update');
                    let toast = this.toastCtrl.create({
                      message: 'Your Post Was Shared to Facebook!',
                      duration: 3000,
                      position: 'top'
                    });
                    toast.present();
                  })
                  .catch(e => {
                    this.loading.dismissAll();
                    this.viewCtrl.dismiss('update');
                    let toast = this.toastCtrl.create({
                      message: 'Error Sharing Your Post to Facebook',
                      duration: 3000,
                      position: 'top'
                    });
                    toast.present();
                  });
              })
              .catch(e => {
                console.log(e);
              });

Thanks in advance for all your help!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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