3
\$\begingroup\$

I'm using Facebook SDK for Unity 6.0 with FB.Feed.

I'm trying to post a link to the user's feed, text and link on his behalf.

So far I've managed to publish only a link and its details, the part where the user can write the post is left empty for him to fill.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Unity 6.0? Didn't they just release 5.0? \$\endgroup\$
    – Philipp
    Commented Aug 27, 2015 at 12:38

1 Answer 1

1
\$\begingroup\$
if (FB.IsLoggedIn)
    {
            FB.Feed(
            linkCaption: "YourGame",
            picture: "http://YourImageLink.png",
            linkName: "YourGameMessage!",
            link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag" + (FB.IsLoggedIn ? FB.UserId : "guest")
            );
    }
\$\endgroup\$
2
  • \$\begingroup\$ FB.IsLoggedIn ? FB.UserId : "guest" is redundant considering that FB.IsLoggedIn is the condition for the whole block. \$\endgroup\$
    – Philipp
    Commented Nov 25, 2015 at 19:55
  • \$\begingroup\$ FB.IsLoggedIn should still work with previous fb sdk versions 6 or below. With the latest fb sdk and the new changes we can now use FB.ShareLink() or FB.FeedShare() \$\endgroup\$ Commented Nov 28, 2015 at 16:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .