0

I know that this has been answered before (Integrate Facebook Messenger into Unity), but I would like to know if there's any update or if someone has been able to solve this somehow (either by developing an extension from scratch or integrating 3rd party extension). Thanks!

Community
  • 1
  • 1

3 Answers3

1

Yes. You can integrate the FB messenger into unity with a plugin as already mentioned in the above answer.

To expand on the custom uri scheme to send to a specific user, you would have to register as a developer with Facebook and create an app ID. Messenger does not let a non FB registered app to share to specific user. For Android pass the intent like this

    Intent intent = new Intent(Intent.ACTION_SEND);
    intent.setPackage("com.facebook.orca");
    intent.setType(mimeType);
    intent.putExtra(Intent.EXTRA_STREAM, contentUri);
    intent.putExtra(EXTRA_PROTOCOL_VERSION, PROTOCOL_VERSION);
    intent.putExtra(EXTRA_APP_ID, YOUR_APP_ID);

where EXTRA_APP_ID is you FB app ID. Check this link https://developers.facebook.com/docs/messenger/android

For iOS Ad the FBSDKMessengerShareKit.framework from the FB SDK to the xCode project and import FBSDKMessengerShareKit.h . And use this code to share on Messenger

    NSString *filepath = [[NSBundle mainBundle] pathForResource:@"corgi"         ofType:@"webp"];
    NSData *webpData = [NSData dataWithContentsOfFile:filepath];
    [FBSDKMessengerSharer shareAnimatedWebP:webpData withOptions:nil];

Check this link for parameter for how to share to specific users https://developers.facebook.com/docs/messenger/ios

0

As of November 3d, 2015, there's no official implementation for this. However, you could do your own Unity3d plugin explicitly for messenger, integrate the SDK on iOS, handle communication between unity and Objective C, etc.

curveorzos
  • 529
  • 6
  • 16
  • Thanks for your answer. I've started my own plugin, but then I've found a new issue. Following the custom uri schemes for FB Messenger described here: http://stackoverflow.com/questions/25467445/custom-uri-schemes-for-the-facebook-messenger I've also realized that the Facebook user id was replaced by app scope id in FB2.0. So there's no way (as far as I know) to call FB Messenger with a specific user (this is what I'm trying to do actually). – Claudio M E Bastos Iorio Nov 05 '15 at 06:20
0

As of Jan 16th, 2015 unfortunately there's no official implementation for this yet. And based on the features included in the Messenger SDK it looks like there's no plans to see this implemented in the short term.