How can i take a screenshot from my game and share it using facebook's unity SDK?

Hey , I’m working on an app , that you have the ability to take a screenshot whenever you can (there’s a button) , and share it to your facebook .

Can someone tell me how to do it please?

Thanks

AFAIK now there is no way to directly share any image to Facebook with Facebook SDK.
You can only share only Image url to the SDK.

With Native script its possible
Check this :Loading...

also try this upload the image to Facebook via FB.API and then use that URl

facebook changed its policy, you cannot share screenshot anymore, I got this information from here:

1 Like

Hey, can you point me to exact point you are refering to? I am unable to find it. Pardon my ignorance. :wink:

I’m not sure why it’s not possible through SDK but possible via intents.

We have this feature in our free version where you can simply post a screenshot or a texture to facebook app. Along with facebook sharing we have options to share to many other social platforms as well.

Hey, thanks for your comment. I would like to ask that whether you guys use official facebook unity sdk or have your own? Since, I am using that sdk for login + analytics (events) + audience network for ads (native + interstitial + banner + rewarded videos).
Also, if you guys use your own. how much effort is required to make my code compatible with your plugin?
Thanks,

We don’t use Facebook sdk internally.

Ideally, its not required to use for basic sharing like these.

Our plugin makes use of app communication mecanism which doesn’t need app to be registered on facebook for app id.

Regarding integration, we have many devs using our plugin with other plugins successfully without any issues.

Thanks,
VB Team

Hi! Tried to post screenshot to FB using version of asset you mentioned. But got no result.
“Android stop working” or something like that appearing when I try to share screenshot or share picture. Sharing text message to FB works though.
Unity 2018.3.6, Samsung Galaxy S7, Android 6.

Can you please share us your apk once to give a test?

We haven’t get any reports about sharing issues. It would be great if you can share us more details either by sharing logcat or apk.

Thanks,
VB Team

Here it is - https://drive.google.com/open?id=1s-qwbZgYwsXhTAHph_EReZPNipSo3aAz

@AlexanderOsipov We tested the apk and seems to work fine as expected. I tested on couple of devices to confirm.
Please send us logcat log to see where it could be wrong. We are pretty sure it should work on all platforms without any problems.
Lets continue on a 1-1 conversation to avoid discussing on this thread.