简体   繁体   中英

Facebook SDK C# - try to post a link through facebook graph api but got (FacebookApiException - #100) Invalid parameter

I'm doing following code for posting a link to my wall from c# desktop application, but it returns (FacebookApiException - #100) Invalid parameter

 FacebookClient fb = new FacebookClient(accessToken);
    Dictionary<string, object> postArgs = new Dictionary<string, object>();
    postArgs["message"] = comment;
    postArgs["link"] = "https://www.google.com/";
     fb.Post("https://graph.facebook.com/me/feed", postArgs);

I am having the same issue.

If I change the link to be the link in my Website => site url it works (ie the url of the application).

I believe they url in the link, you want to use, can be added to the App Domains section of the basic app settup. I have had mixed results with this.

you must turn off the Stream post URL security option in the dashboard of your app: https://developers.facebook.com/apps , clic on settings and then migrations.

仪表板

See more information in the Migrations > Stream post URL security bullet : https://developers.facebook.com/docs/facebook-login/security#surfacearea

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM