1

I am making mobile app using Sencha touch which will be bundled as native app and installed on devices. In my app on certain pages I want to add "share" functionality which is supposed to post some data to user's feed. While testing on browser I can to do that by opening a window with FB sharing url like "https://m.facebook.com/dialog/feed" or "https://m.facebook.com/sharer.php" and passing all related params as explained in https://developers.facebook.com/docs/reference/dialogs/feed/

But when this app is bundled and I share with this, user is moved to browser and cannot return to app because redirect_uri cannot point to app which is why I wanted to open this dialog within my app, probably in an iFrame. This is also not possible because these dialogs are not allowed to be embedded in iframe by META tags and in order to surpass it I have to do user login which again is another dialog which I cannot open in my app's iFrame.

I also looked at sample sencha app http://blooming-day-7830.herokuapp.com/ but it also takes user to separate login page instead of opening in-app dialog.

So my questions is how does hybrid apps connect with FB without moving out user to browser?

4

1 に答える 1

1

PhoneGap を使用する場合は、次の 2 つのオプションを試すことができます。Phonegap 通話を切り替える前に、iOS のバージョンを確認する必要があります。. .

オプション 1 : iOS 6.0 より前の場合

Phonegap には、iOS 5.0 以下のアプリを終了せずに FB 共有ページをロードするために使用できる、非常に気の利いた ChildBrowser プラグインがあります。

オプション 2 : iOS 6.0 以降の場合

Facebook 共有機能が iOS に追加されました。したがって、作成したカスタム プラグイン クラスを呼び出し、基本的な Phonegap プラグイン呼び出しを使用して標準の FB 共有コードを呼び出すだけです。アプリを離れる必要はありません。ChildBrowser が表示される必要はありません。代わりに、表示されるストック iOS-FB 共有シートを取得し、写真やテキストなどを追加して投稿することができます。フェイスブック。

于 2013-03-26T20:07:32.843 に答える