Corona Sdk to get integrated with social networks - facebook

I just need your help with regards to allow posting on Facebook and Twitter from Corona SDK, and before posting I need to make sure that the facebook or twitter app is being installed on end user device.
Thanks,

You can use plugin CoronaProvider.native.popup.social
-- To use this plugin, add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.
settings =
{
plugins =
{
["CoronaProvider.native.popup.social"] =
{
publisherId = "com.coronalabs"
},
},
}
-- and then in any button event use function
native.showPopup( name, options )
https://docs.coronalabs.com/plugin/CoronaProvider_native_popup_social/index.html
https://docs.coronalabs.com/plugin/CoronaProvider_native_popup_social/showPopup.html
This is pretty universal solution, because it will auomatically give user choises of various socials, where to post, if he have such apk in his device: twitter, facebook, skype, email and so on.

Related

Like option using cordova

I need a web and mobile application which will work on android, iphone and windows as well.
I want to use facebook login for my apps and customer can like my page after login thats why i am using cordova to convert my web app into android app but i need to integrate facebook-like option which i didn't get in plugin.
So i implemented this using oglike
$scope.facebookLike = function() {
if($localStorage.hasOwnProperty("accessToken") === true) {
$http.post("https://graph.facebook.com/me/og.likes?access_token="+$localStorage.accessToken+"&object=https://www.facebook.com/Nxtlife-Technologies-Ltd-UK-180614345644169/?ref=br_rs");
alert("like sucessfully done");
} else {
alert("Not signed in");
$scope.facebookLogin();
}
}
Problem:
The code will not throwing any error but after success message it didin't make any changes to my page. like count is remains same.
og.likes is for Open Graph objects – external URLs, outside of Faceook.
You can not like Facebook pages by any other means than the official Like button.

how to implement facebook feed using ionic framework for hybrid app

I am working on a hybrid mobile app using ionic and cordova, In the app I am sharing pictures with comments in social media. I want to impliment "facebook feed" method to share pictures in facebook with custom comments.
I have tried ngCordova's Facebook plugin but I faced some Issues in that, where the issue ticket is still open in the plugin builder's github. So I removed this plugin.
I have seen ngOpenFB but there I have'nt found $openFB.ui() method for feed dialog.
I want to know that is there any plugin available by which I can impliment Facebook feed for image sharing in my app.
Thanks in advance.
Please have a look for your facebook integration in your hybrid app nicraboy
// Add to openfb.js and use it.
function ui(method,obj) {
var method = method || 'GET',
params = obj || {},
xhr = new XMLHttpRequest(),
url;
params['access_token'] = tokenStore.fbAccessToken;
params['redirect_uri'] = 'http://localhost:8100/#/tab/chats';
params['display'] = 'popup';
params['sdk'] = 'joey';
params['app_id'] = 'APP Id in Integer';
url = 'https://www.facebook.com/v2.6/dialog/' + method + '?' + toQueryString(params);
window.open(url, '_open', 'location=no,clearcache=no');
//window.open(url, '_self', 'location=no,clearcache=no');
}
Also have a look at this repo: https://github.com/srameshr/ionic-starter-oauth

facebook login api doesn't respond in phonegap wp8 app

I'm using phonegap 3.5.0-0.20.4 & wp8 platform. My FB.login call simply doesn't seem to do anything (no response). I checked other replies around similar problem, but none seem to help wp8 platform. Here is my sample code
FB.init({appId: "23...32", version: 'v2.0'});
FB.login(function (response) {
console.log(JSON.stringify(response);
}, { scope: "email" });
My login call simply doesn't go through. I do have webbrowser & device plugins installed on the phonegap app.
Any ideas?
There are deprecated documentation, try this
FB.login(['public_profile'], successCallbackFn, errorCallbackFn);
But this has no sense because facebook does not return callback functions on login after april's sdk update to version 3.14
Please let me know if facebook login will work for you.

How to setup Facebook App Request from Unity with Prime31 Social combo plugin?

my problem is this, when the user is asked to select friends from the list and click on Send I receive a Success state from callback but no request is reached from the people selected in the list.
My setup is this:
- my app is a native app for iOS and Android made in Unity
- my app is registered in Facebook developer portal as Game/Puzzle, I set up bundle id, package name, display name and namespace
- my app is not yet published
- I configured the Prime31 Facebook plugin with the appId given from Facebook and Display Name
I send my request like this:
public void AskLifesOnFacebook()
{
var parameters = new Dictionary<string, string>
{
//{ "app_id", "#######my_app_id_number####" },
{ "method", "apprequests" },
{ "title", "My request title" },
{ "message", "My request text" }
};
FacebookCombo.showDialog("apprequests", parameters);
}
But still the friends selector is shown up correctly on an overlay windows, I select friends and send the request but no request is received.
Am I missing something in the configuration of my app on Facebook? Do I need to pass some kind of certification?
From the same app the stream.publish is working correctly and I can publish on user walls.
The setup with Prime31 plugin and the call are correct!
You have to enable "Single Sign On" and "Deep Linking" in Facebook app parameters and add a valid itunes ID for your app (while testing you can put any valid ID, but you should create a itunes connect entry for your app and get the final ID).
When your app is a native iOS app, the users see the notifications only through the Facebook iOS app, so they are guarantee they can open iTunes or run the game.
Global notifications instead (ej: regular browser on PC) are seen if the app is in a Facebook Canvas.

BlackBerry Facebook jar file in eclipse

I know this might sound a very basic question but I am having an issue in using Facebook SDK for Blackberry. I have downloaded the latest one 0.8.25. I have imported them in my eclipse and they are present in the referenced libraries. I have a game app where I want the users to login using their facebook account. Which class contains the code for logging in? Are the jar files implementable or they are just for reference? I have read forums posts where users say that they executed Strawberry program but I can no where find any executable source code. Kindly please let me know how do I create a login page for BlackBerry using its SDK. I did go through another link of Sample Code here!
Let me know which class has login code or how do i use the SDK
At the very basic least, you need to get an instance of the Facebook object and call getCurrentUser(). So, for example:
String[] permissions = new String[] { Facebook.Permissions.ALL_PERMISSIONS };
Facebook fb = Facebook.getInstance(new ApplicationSettings(myNextUrl, myAppId, myAppSecret, permissions));
User fbUser = fb.getCurrentUser();
The code in the library will handle all of the details like getting the user to login to facebook account and accept the requested permissions and so on. You'll want to wrap that all in a try/except to catch FacebookException for error conditions (e.g. user refuses your request).