i developing a poster software, when i'm trying to post a link it give the following exception

facebook api exception #100-invalid

here's my code

 public static bool post(string accesstoken,string status,string link) {
        try
        {
            FacebookClient fb = new FacebookClient(accesstoken);

            Dictionary<string, object> postArgs = new Dictionary<string, object>();
            postArgs["message"] = status;
            if (link != "") {
                postArgs["link"] = link;
                MessageBox.Show(link);
            }
            fb.Post("/me/feed", postArgs);
            return true;
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.ToString());
            return false;
        }
    }
}

Recommended Answers

What is the link you are trying to pass? I haven't used the FB SDK for awhile but I think I remember the link had to be acessible i.e. not behind a firewall or on your local machine for FB to accept it.
Apart from that, is the format of …

Jump to Post

All 2 Replies

What is the link you are trying to pass? I haven't used the FB SDK for awhile but I think I remember the link had to be acessible i.e. not behind a firewall or on your local machine for FB to accept it.
Apart from that, is the format of the link correct? No errors?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.