简体   繁体   中英

IOS Standalone Web App Facebook Share Error 104

In one of my Web App , I have to integrated Facebook Share Feature. It is working fine for normal Web APP . Following is the code:

FB.ui({
   method: 'feed',
   name: "App Name",
   link: "App Links",
   description: "My Description",
   picture: "image",
   show_error: true,
   display: 'popup'
  },
  function (response) {
      console.log(response);
  }
);

It is properly sharing my content to Facebook , however in iPhone , when I select web app to Add To Home Screen , and then try to share link from the app added in home screen, it is giving error of 104 .

I have attached screenshot for reference

在此处输入图片说明

Any idea, how can I resolve this issue or if I am missing something?

Thanks for your time.

Finally able to resolve this using URL Redirection as described here :

So here is my code.

I first determine if app is standalone or now and accordingly use the corresponding code

if(!standaloneApp) {
    FB.ui({
       method: 'feed',
       name: "App Name",
       link: "App Links",
       description: "My Description",
       picture: "image",
       show_error: true,
       display: 'popup'
      },
      function (response) {
          console.log(response);
      }
    );
} else {

   var fbShareOptions = {
      app_id: fbAppId,
      name: "App Name",
      link: "App Links",
      description: "My Description",
      picture: "image",
      display: 'popup'
   };

   window.open('https://www.facebook.com/dialog/feed?'+jQuery.param(fbShareOptions),'_blank');
}

Hope it helps someone.

  • Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM