0

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

enter image description here

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

Thanks for your time.

Kalpesh Patel
  • 2,772
  • 2
  • 25
  • 52

1 Answers1

0

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
Kalpesh Patel
  • 2,772
  • 2
  • 25
  • 52