Can I use the JavaScript facebook SDK for phonegap apps? - facebook

I am not sure whether my question is appropriate or not.
I am integrating facebook for the first time and also for the for first my app is multi-platform.
I am integrating facebook in my app for iphone and android.My question are below:
1)If i am doing it with plugin i have to do it separately for both iPhone and Android. Is there any way to integrate Facebook for both in a single effort for eg by using Javascript SDK
2)If yes what it is? and if possible any sample.
Thanks in advance

You should use phonegap-plugin-facebook-connect. It works on both iOS and Android and integrates great with iOS6 bulid in Facebook functionality.
The plugin provides a patched version of the Facebook JS API.

Related

Creating native plugins to implement missing functions of the official Unity Facebook SDK

I want to give the possibility to the players of my game, to publish to their Facebook feed images and videos stored on their device.
The Facebook SDK does not seem to provide this feature through FB.FeedShare. Only already hosted media can be referenced in the mediaSource field.
Several questions have been asked about this subject (1, 2, 3)
However, the Android SDK and iOS SDK does provide it. Isn't the Facebook SDK a simple "abstract layer" wrapping the native SDKs? Why all the native SDK features haven't been implemented?
I know an alternative solution would be to upload the media using the Graph API and reference from the FB.FeedShare function.
EDIT: As mentionned by #misorude, the publish_actions permission has been removed
TL;DR
Is it possible to create the Android and iOS plugins that would call the native functions used to share a media stored on the device of the users?
If so, do you know how is it possible to "reference" the native Facebook SDKs without bundling them into the plugins I will create? (Since they are already in the Unity Facebook SDK in my project).
EDIT: Seems like someone already tried to create a wrapper, but "it didn't play nice"
I am also open to other suggestions. My final goal is to let the user publish a video. I would love to use intents to open the Facebook app, but iOS does not have such feature.
Thanks in advance.

How to integrate Facebook sdk in titanium for ios and Android?

Hi am working on an app Using Appcelerator Titanium, in which i have to integrate Facebook sdk. i am so confused on using which sdk have to use .. whether choose the ios or android or javascript sdk. Another query is , whether if have to create a separate project for ios and Android. or a single project is enough. Thanks in advance
You can either check the Facebook support shipped with Titanium SDK: http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook
Or you can check out this module on github: https://github.com/appcelerator-modules/ti.facebook

share to social iphone native code

I want to share messages to social networks from my phonegap application. For that i m creating plugin for iphone and android.
i found code for android:
String message = "Text I wan't to share."
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("text/plain");
share.putExtra(Intent.EXTRA_TEXT, message);
startActivity(Intent.createChooser(share, "Title of the dialog the system will open"));
But i can't able to find code for iphone.. can you please help me?
You can use FacebookConnect plugin authorise by Phonegap team.
This plugin provides a simple way to use Facebook Graph API in
Cordova.
This plugin is built for Cordova >= v2.1.0 with ARC. Both iOS &
Android are supported with the same javascript interface.
Use can also use Dave johnson's plugin, this also support iOS and Android platform.
The share Intent is part of the Android SDK and not iOS! Nothing like this exists for iOS and you will just have to integrate each social network separately.
You may want to look at this and this for facebook and twitter integration as these are now part of iOS (Twitter was integrated into iOS 5, Facebook in iOS 6).

Phonegap facebook, html5 video, iAds issues

I'm trying to build android+iOS application via phonegap build API. I found that that this api has some limitations, but I want to make sure...
1) Implementation Facebook features to phonegap application is possible only by phonegap plugin, which is not able to add via build API.
2) iAds aren't also supported. I found some plugin which can handle this, but as in first point, it is not possible to add plugins via phonegap build API.
3) Playing video using HTML5 video tag doesn't work if operation system of device doesn't have installed needed codecs. And there is no other way how to be sure that some type of video will be playable on most androis/iOS devices.
...so when I want to build applications via phonegap API, I have to forget to use facebook, iAds and video(on all devices) ?
Thank you.
For your first question: in the case of facebook some facebook plugins exist, you may want to look here:
http://www.mosacrea.com/how-to-post-to-the-facebook-wall-in-an-iphone-app-with-phonegap-facebook-connect-and-childbrother-plugin/ it uses the ChildBrowser plugin..
or here:
http://eisabainyo.net/weblog/2011/06/25/how-to-post-on-facebook-wall-on-iphone-and-android-using-phonegap-plugins/ same thing but with a slightly different approach.
hope it helps...

iPhone Facebook Graph API library

Is there an library for the iPhone using the new Facebook Graph API yet?
This library is great: http://www.capturetheconversation.com/technology/iphone-facebook-oauth-2-0-and-the-graph-api-a-tutorial-part-2
I am using it with great success in a current iPad project.
Update: Author just posted code to github: http://github.com/reallylongaddress/iPhone-Facebook-Graph-API
Update: Please check https://github.com/reallylongaddress/iPhone-Facebook-Graph-API/issues/4 if you find post to FB crashing while using code
Not that I have seen and trying to write something myself has been without success. I am VERY disappointed with Facebook and there lack of support in this area especially since they want developers to move over to the API, however iPhone developers are SOL at the moment which is a shame since using their current SDK is a pain in the ass with all of their callbacks and delegates. It is not very clean at all.
FB Graph API SDK for iPhone is rumored to be released during WWDC. Android SDK is already officially announced (but not released, yet).