titanium-ios-facebook icon indicating copy to clipboard operation
titanium-ios-facebook copied to clipboard

Add feed dialog fallback to share without FB app

Open PierreGUI opened this issue 11 years ago • 11 comments

See https://github.com/mokesmokes/titanium-ios-facebook/issues/4

PierreGUI avatar Sep 24 '14 14:09 PierreGUI

@PierreGUI thanks, I will review this next week and if all is well accept. Thanks for the work! :)

mokesmokes avatar Sep 24 '14 14:09 mokesmokes

I tried but link url not pass to feed dialog.

vivizth avatar Nov 11 '14 10:11 vivizth

Here's my thinking on this: users who want to share on Facebook will have the Facebook app installed on the phone. Do you really think that using this is a realistic scenario? What are the odds of someone wanting to share but not having the app?

mokesmokes avatar Nov 11 '14 10:11 mokesmokes

This is how I use it, hope it can help:

Facebook.dialog( 'feed',
    {
        message : postText,
        link    : facebookPostUrl,
        name    : $.video.get('title'),
        caption : $.video.get('title'),
        picture : $.video.get('thumbnail')
    },
    function() { ... }
);

Where facebookPostUrl is a string giving the link to a page that contains facebook's open graph meta tags like <meta property="og:title" content="My page's title"/>

edit: @mokesmokes: as a fallback, it is to be used in a 'worst case scenario' context.

PierreGUI avatar Nov 11 '14 10:11 PierreGUI

I understand it's a fallback. And many people don't install the Facebook app - true. But if a user didn't install the FB app then do you really want Safari to open and take the user out of your app? What are the chances that the user will actually want to share in this case? I think the chance is close to zero (because people who like to share install the app...). I think this may cause more harm than good by switching to Safari for no good reason 99% of the time.

mokesmokes avatar Nov 11 '14 10:11 mokesmokes

but this fallback doesnt take user out of the app , it just a share/login dialog popup in the app. ( if I understand correctly. :D )

vivizth avatar Nov 11 '14 10:11 vivizth

https://developers.facebook.com/docs/ios/ui-controls#feeddialog : Since the Feed dialog opens a web page for sharing, it must start by asking people for their Facebook credentials in order to verify their identity, which disrupts the sharing flow. People are also asked to re-enter their credentials over time as their password changes. The Feed dialog does not support Open Graph and supports only the basic attachment model which includes a link, title/description text and an image.

mokesmokes avatar Nov 11 '14 10:11 mokesmokes

It will open safari and ask for credentials, and that's annoying but mandatory. Once it's done you'll get this web-popup (iphone 4 screenshot ftw): fbsharefeed

This popup is indeed not based on Open Graph tags in the link I've provided, but takes a title, description and picture as arguments. Sorry I mixed up this part.

PierreGUI avatar Nov 11 '14 10:11 PierreGUI

@mokesmokes so you prefer to support only users who have the facebook app installed right ? I have to ask because now we have forked you module and modify to support the fallback, but also we need to keep update from yours

lauv-pussaaon avatar Jan 29 '15 11:01 lauv-pussaaon

@pussaaon no, that is not the intent at all: I want to support all users! :) and for example, login works for all. But I logically think that an end user who didn't install the Facebook app is also not interested in "sharing" on Facebook. So in this case I hide my share button - i.e. I really believe that the fallback is a bad user experience.

I am not "against" the fallback being available for developers who really want it, but it's just not on my priorities. If you guys submit a PR for this, and if this code doesn't "force" a fallback, then I would accept it.

mokesmokes avatar Jan 29 '15 12:01 mokesmokes

@PierreGUI my apologies for not commenting on this PR much sooner. My problem with this PR is that it forces a web dialog if the Facebook app is not installed. I think the flow (in Javascript) should be the following:

  1. If FB app installed, use Share Dialog
  2. If not installed, app may choose to use a web dialog, or may choose nothing.

So bottom line: let's not mix the Share Dialog together with other dialogs, each one should be a separate API and controlled independently from Javascript. Thanks!

mokesmokes avatar Jan 29 '15 12:01 mokesmokes