I want facebook/twitter functionality with my phonegap application for all device iOS, Android and Blackberry. I dont want to change its functionality for my future phonegap apps. Is it possible to code same for all devices like IOS, android and blackerry.
Asked
Active
Viewed 1,270 times
0
-
can we use same code for iOS, Android and Blackberry with this plugin : https://github.com/phonegap/phonegap-facebook-plugin – Anup Apr 25 '13 at 05:53
-
Phonegap plugins are designed to be used with the same javascript code but you have to "install" each specific pluing in the corresponding platform project. To be sure this plugin is available for each platform, check if it exists in each platform folder here : [https://github.com/phonegap/phonegap-plugins](https://github.com/phonegap/phonegap-plugins) – Antoine Apr 25 '13 at 08:10
-
This solution will not work as BlackBerry is one of your requirements above. There is no such platform plugin for Phonegap for BlackBerry (legacy OS 6/7) and BlackBerry OS 10. – M Azam May 05 '13 at 12:17
1 Answers
0
If you don't want to use any plugin, search for posting on Facebook and Twitter with Javascript... you will be abble to use the same code for all devices.
For Facebook : How to upload photos on Facebook event through phonegap?
But for Twitter the question still unsolved for uploading media : How to post image on twitter in Phonegap using javascript
A full Twitter example for updating status (with authentication) : http://www.oodlestechnologies.com/blogs/Twitter-integration-on-PhoneGap-using-ChildBrowser-and-OAuth-for-iOS-and-Android-Platforms
-
I need both not only post/share something on facebook or twiter but also i need to facebook and twitter login. – Anup Apr 25 '13 at 09:27
-
A full Twitter example for updating status (with authentication) : http://www.oodlestechnologies.com/blogs/Twitter-integration-on-PhoneGap-using-ChildBrowser-and-OAuth-for-iOS-and-Android-Platforms – Antoine Apr 25 '13 at 09:38
-
For Facebook login try : http://developers.facebook.com/docs/reference/javascript/FB.login/ – Antoine Apr 25 '13 at 09:40
-
Has anyone had any success with the above tutorial. As of the late, Twitter is getting rid of v1.0 of their oAuth API and v1.1 will be employed. The URLs have changed in v1.1 and the oauth_verifier is no longer sent back as a URL param. This tutorial employs the PIN-based oAuth method which is simply not useful as the user will have to remember and then re-enter the code into your app for the process to continue. There is currently no way to automate an oAuth connect to Twitter and Phonegap with v1.1 of Twitter API. If anyone has a solution, please share. – M Azam May 05 '13 at 12:20
-
I've already use with success the full twitter example. There is no expiration on the twitter side of the secret token and the token of the user so you can just save them to the local storage to reuse it. Your user will not have to re-enter its login. I think you can also easily change the 1.0 api version to the 1.1. – Antoine May 06 '13 at 07:20