Announcing......SDKBOX Facebook plugin...That's right!

you must use Facebook rest api ver 2.4 like this for profile pics “/me?fields=gender,name,email,link” but i can’t find app request method

can you do:

sdkbox import -vv facebook

and

sdkbox symbols

and post the output of both, please.

1 Like

please add friends invitation…

I also really want this feature.

1>For Integrating FB features(AppRequest/Invite/Share/Login/Score Api) on Cocos2dx3.6 iOS(C++) project this below link is Valid or its an outdated one. if its outdated one, please suggest me what are the links i have to follow to integrate FB. (FACEBOOK INTEGRATION INSTRUCTION FOR COCOS2D-X AND COCOS2D-X-LUA ON IOS)
2>Is all of the above mention FB features are included on Facebook SDKBOX Plugin…?

The link you mention is very outdated, please don’t use it.

This should get you started: http://sdkbox-doc.github.io/en/plugins/facebook/v3-cpp/

Also, I have a blog post that details specifics that I am reviewing and getting ready to post.

1 Like

Is there any extra steps to implement facebook for web version,because when i add this function sdkbox.PluginFacebook.init() in app.js file it is showing uncaught reference error sdkbox is not defined.

I’m having difficulties with dialog based FB communication. All the other functions work good, but dialogs never opens.

This code is taken directly as is from your example:

onFacebookDialogLink:function(sender) {
    console.log("Pp: Facebook: share link");
    var data = {}
    data.link = "http://www.cocos2d-x.org";
    data.title = "cocos2d-x";
    data.text = "The Best Game Engine";
    data.imageUrl = "http://cocos2d-x.org/images/logo.png";
    sdkbox.PluginFacebook.dialog(data);
},

No dialog opens.
Any hint on what is wrong?

I had FB app installed but for some reason it did not for with the API. I’ve updated the app and the dialog works as expected. I would be nice to have API feedback on missing/not_functioning FB application just like the legacy FB plugin did.

Do you plan on adding such methods? In the meanwhile, would you recommend a workaround?

Thanks!

Yes this is quite annoying, We’re thinking adding function like to detect this kind of issue.

bool hasFacebookApp();

@slackmoehrle
Are there any plans for adding AdMob support in the SDK Box?
Can you give us any expected date for this release?

I quite liked the way it is implemented in the plugin. It is more generic because there could be more reasons why the dialog may not be shown. As I wrote in my previous post I had the app installed but it did not work with the API for some reason (pre-installed version).

Here is the plugin implementation:

public boolean canPresentDialogWithParams(final JSONObject cpInfo){ 
	try {
		String dialogType = cpInfo.getString("dialog");
		if("shareLink".equals(dialogType)){
			return FacebookDialog.canPresentShareDialog(mContext, ShareDialogFeature.SHARE_DIALOG);
		}
		else if("shareOpenGraph".equals(dialogType)){
			return FacebookDialog.canPresentOpenGraphActionDialog(mContext, OpenGraphActionDialogFeature.OG_ACTION_DIALOG);
			
		}
		else if("sharePhoto".equals(dialogType)){
			return FacebookDialog.canPresentShareDialog(mContext, ShareDialogFeature.PHOTOS);
			
		}
		else if("apprequests".equals(dialogType)){
			return true;
		}
		else if("messageLink".equals(dialogType)){
			return FacebookDialog.canPresentMessageDialog(mContext, MessageDialogFeature.MESSAGE_DIALOG);
		}
		else if("messageOpenGraph".equals(dialogType)){
			return FacebookDialog.canPresentOpenGraphMessageDialog(mContext, OpenGraphMessageDialogFeature.OG_MESSAGE_DIALOG);
		}
		else if("messagePhoto".equals(dialogType)){
			return FacebookDialog.canPresentMessageDialog(mContext, MessageDialogFeature.PHOTOS);
		}
	} catch (JSONException e) {
		e.printStackTrace();
	}
	return false;
}

Do you have at least a rough EST when could this go live?

It is not on our list for the next month. After this month, I don’t know yet either. I will let everyone know if we start working on an AdMob plugin.

@slackmoehrle Thats great !! is the blog post published??what is the link please share.
Thank you !!

I have the same problem :worried:

build apk and install it on ur device or in bluestack. it will workk :slight_smile:

1 Like

@slackmoehrle Any updates on FB SdkBox plugin for (get friend list,invite friends,app request,score api )…?

I don’t have an update at this time. I will talk to engineering and get back to this thread.

I am working on integrate Android facebook via SDKBOX in my cocos2dx project,
I followed the steps, but always got java.lang.NoClassDefFoundError: com.facebook.R$layout fatal error.
the cocos2dx version i am using is 2.2.6, and sdkbox facebook version is sdkbox-facebook_v1.2.1.0_for_v2.
I am not familiar with Android development. Please give me a hand figure out whats wrong and how can I fix it,
Appreciate for any response!

Ok, I’ll create a sample for Facebook with 2.2.6 tomorrow.