Integrating Facebook, Twitter, Google+ into Android app using PhoneGap
Asked Answered
D

3

7

I want to integrate Facebook (like), Twitter, Google+ (bubble button) into my Android app which is developed using jQuery Mobile within PhoneGap, so that users can post content from the page on their walls. Nothing is working for me.

Didst answered 17/9, 2011 at 15:13 Comment(0)
G
1

For Facebook, phonegap-plugin-facebook-connect works well although integration is more convoluted than it ought to be.

Gorlicki answered 21/7, 2012 at 15:24 Comment(0)
S
1

I am able to solve it in the following way:

1) When User clicks Google, Facebook, Twitter etc, I open a link (http://www.mywebsite.com/login/google) in InAppBrowser (PhoneGap native function, no plugin required) if Google is clicked

2) When the link is opened, my server redirects to Google.com and user sees Google login page.

3) User authenticates itself with Google and Google redirects with the token to my server.

4) Now my server uses that token to create some accounts, logs, do some more operations and then redirects to a url with information required by my phone application.

E.g. - It redircts to http://mywebsite.com/login/google/successful?token=<>&query-string-parameters

5) InAppBrowser is listening for URL changes and when it finds a URL with the above pattern, it takes over, strips the URL, parses the information sent with the URL and then closes InAppBrowser.

Semantics answered 15/4, 2014 at 23:31 Comment(0)
W
0

Here is a blog post describing how to integrate twitter and facebook to phonegap

The thing is that iframes on phonegap have a weird behavior, and twitter and facebook oAuth require that, so you need to use ChildBrowserPlugin

Wilburwilburn answered 27/10, 2011 at 0:35 Comment(1)
Its not working for me george.I have tried few other facebook related plugins also,but I am not able to get it.Can anybody help me with sample code?Didst

© 2022 - 2024 — McMap. All rights reserved.