Unity facebook SDK, can not post picture with FB.Feed
Asked Answered
U

1

6

In my Unity IOS game, I am unsuccessfully trying to use FB.Feed to share a screenshot on the user's wall. Facebook documentation uses FB.Api to publish the screenshot, but this method does not display a share dialog, it simply uploads the pic to Facebook.

Answers I have found so far:

  1. Upload the picture using FB.Api, and then parse the FBResult for the picture URL, and feed that to FB.Feed Link to answer. This method triggers an error, since it is not possible to use a Facebook URL as source for a picture.

  2. Save the picture locally and prepend "File://" to the picture path. Link to question. This does not seem to work either, and the Facebook documentation does not seem to have any information on URL formatting.

My question:

Is this the correct (and only) way to display a share dialog when publishing a picture? Or am I looking in the wrong direction?

Uncork answered 28/5, 2014 at 13:12 Comment(2)
There currently isn't a way to do this yet.Mozellamozelle
Facing the same issue, I'm just wondering if it's sharing anyway, than why it's not possible to use the share dialog:\Gregory
S
4

FB.Feed only allows you to post link to images. It doesn't upload the images to Facebook. Therefore, these images need to hosted somewhere on the net and not locally.

The best way to make it work is either upload the images to FB (with privacy property set to EVERYONE) using FB.API, and then share the link to that picture via FB.Feed. If you don't want to create duplicate stories, i.e. one from posting the picture and another from FB.Feed, make sure that you set no_story to true.

Sportscast answered 28/8, 2015 at 6:4 Comment(1)
Puneet where is the code to do what you have suggested?Osber

© 2022 - 2024 — McMap. All rights reserved.