Facebook上的图片上传

时间:2015-02-18 11:14:06

标签: facebook windows-phone-8.1

您好我正在尝试将图片从我的wp8.1应用程序上传到脸书,但其中一个问题是张贴的图片只有我才能看到,除非我从Facebook更改它。我想自动发布它们供公众查看。这是我的代码:

 var postParams = new
        {
            access_token = ObjFBHelper.AccessToken,
            message = "My message",
            source = pic,



        };

  try
     {
       dynamic fbPostTaskResult = await    fbclient.PostTaskAsync("me/photos",postParams);
     var responseresult = (IDictionary<string, object>)fbPostTaskResult;


        }
        catch (Exception ex)
        {
            //MessageDialog ErrMsg = new MessageDialog("Error Ocuured!");

        }

1 个答案:

答案 0 :(得分:0)

var parameters = new Dictionary<string, object>
{
    { "message", FacebookMessage },
    { "privacy", new Dictionary<string, object>
        {
            { "value", "ALL_FRIENDS" }
        }
    }
};

我在stackoverflow上找到了这个。也许它对你有帮助吗?

来自:SO question