SMB
SMB

Reputation: 11

FB.ShareLink return error ShareLink Error: API_ERROR: API_ERROR

Hey guys I am trying to write a program that share a link in facebook. I got it worked perfectly done on Nox and some certain android phone. But for some reason it is not working on some other phones and the error got returned was ShareLink Error: API_ERROR: API_ERROR. Please let me know how do I fix this. I tried to install all the api in android sdk manager and it is still not working Thank you.

I followed the facebook developer code on their documentation

void FacebookShare() {

    FB.FeedShare(link: new System.Uri("https://www.youtube.com/watch?v=plYDSFq42Mo"),
    linkName: "The Larch", callback: OnShare);      
}


private void OnShare(IShareResult result)
{
    if (result.Cancelled || !string.IsNullOrEmpty(result.Error))
    {
        Debug.Log("ShareLink Error: " + result.Error);

    }
    else if (!string.IsNullOrEmpty(result.PostId))
    {
        // Print post identifier of the shared content
        Debug.Log(result.PostId);
    }
    else
    {
        // Share succeeded without postID
        Debug.Log("ShareLink success!");     

    }
}

Upvotes: 0

Views: 1128

Answers (1)

Akon.D
Akon.D

Reputation: 11

if your app is in development, u must create a test users in facebook developer,and use the test account login to facebook, so u can share data successful,

Upvotes: 1

Related Questions