Wednesday 7 September 2011

how to post on user's wall in facebook

for posting on users wall we have to give publish_stream in scope.for all scope and permission in facebook you can follow the link:
http://developers.facebook.com/docs/reference/api/permissions/


callback.aspx.cs:
--------------------------------------------------
oAuthFacebook oAuth = new oAuthFacebook();
if (Request["code"] != null)
        {
            try
            {
                oAuth.AccessTokenGet(Request["code"]);
                Api api = new Api(oAuth.Token);
                User u = api.GetUser();
                api.PostFeed("Message", "Picture Path on web", "Link", "Name", "Caption", "Description");
              }
             catch
            {

             }
    }


No comments:

Post a Comment