Facebooks share change - FB Unity SDK

Recently it appears Facebook has changed how they allow stuff to be shared. Currently we use the Facebook Unity SDK which provides both FB.FeedShare and FB.ShareLink options. However, with the new change, the image no longer gets shared through either of these calls.

Is anybody currently sharing through another method that is still working for them?

Appreciate any help provided.

1 Like

I spotted this: Feed Dialog - Sharing - Documentation - Meta for Developers

Stopped working a week or so ago, July 17, 2017. Is that the API that’s failing for you?

We’re using FeedShare and ShareLink. I don’t believe Feed is included in the FB Unity sdk.

What actually seems to have changed is Facebook no longer allows custom images linked directly (which probably is why Feed doesn’t work correctly either). So using either call, we normally passed in title, description, image link, and a link for when you clicked on the shared image.

A little help on the Facebook developer group has me a little closer. Apparently I can set all that stuff to null or “” and that is now included in the html that we can link to instead of the image, but I’m just getting a white box. The faq makes some claims about image size and such, but we’re under those specs.

I also ran the html file through Facebooks sharing debugger and the image shows there, so now I’m still trying to figure this out.

It’s possible they haven’t updated their Unity SDK to reflect the new change.

Hi there,

Were you able to work around this?

Thanks.

Can see my post here Facebook FB.ShareFeed not posting image linked - Unity Engine - Unity Discussions

It basically is an html file with meta tags. Then we added a redirect link on it so when the image is clicked on, it redirects to the game depending on what platform you are on. I ended up using ShareLink and just passing in the html file url as the first parameter and setting the rest to null or “” (except the callback).

1 Like

I’m having issues with this. I wrote a PHP script on my server to generate a dynamic skeletal HTML page containing the required meta tags. Seems no matter what I try, Facebook posts a simple ugly rectangle with a link to my PHP script (not the link as provided in the meta tags.)

I think I must be missing something simple. BTW…I’m testing it by pasting the link inside a status update in Facebook and watching Facebook interpret the results…I assume results from my app would be the same?

-John

Honestly, I’m no expert on this. Not sure if the PHP file works with facebooks sharing. I just made the HTML files and moved on. It’s a little annoying, but it was quick and solved the issue at the time. It’s possible it doesn’t work because you are creating an HTML file dynamically and FB may not like that. (I think that’s part of why the old way of sharing was removed)

Facebook has a share debugger though at https://developers.facebook.com/tools/debug/sharing/ where you can post the link and have Facebook tell you what it doesn’t like, so I would try it and see what happens.

The debugger should mimic what your app users would experience if they share.

Brathnann…that link is enormously helpful, thank you very much. Doesn’t seem like the PHP is an issue (at first glance.)

-John

Glad it could help. Someone on the Facebook developer group posted this link and said they got the PHP thing working for them. https://forums.coronalabs.com/topic/53740-tutorial-how-to-customize-the-facebook-share-dialog-using-dynamic-meta-tags/?fref=gc&dti=146797922030397

If you still don’t have it working, maybe it will help. I haven’t looked over it myself yet

I was able to get it working…my solution was very similar to the one in the link you shared. Very simple, create some GET parameters which are substituted into the skeletal HTML. Works great! Thanks again for your help.