-1

I am trying to post something on my friend's timeline and I keep on getting an error every time i try to do it. the code i am using is below. i wonder if the code is correct? Cause it doesn't work for me. Can you help?

dynamic parameters = new ExpandoObject();
if (!string.IsNullOrEmpty(action.Post.PictureLocalSource))
{
     var pictureTracking = GetNextPhotoFromFolder(action.Post.PictureLocalSource);
     if (pictureTracking != null)
     {
         //  action.Post.Picture = pictureTracking.FBPictureRef; // org
         action.Post.Link = pictureTracking.FBPictureRef;
         action.Post.Picture = pictureTracking.TrackingFileName;
         parameters.type =  "";
      }
}
parameters.to = action.FacebookPostTargetID;
//parameters.Add("from", MyFacebookID);
parameters.message=action.Post.Message.Trim();
parameters.link = action.Post.Link;
parameters.picture = action.Post.Picture;
parameters.source = action.Post.Source;
parameters.name  = action.Post.Name;
string caption = action.Post.Caption;
if (caption.Length > 200)
    caption = caption.Substring(0, 200);
parameters.caption = caption.Trim(); // "Σχετικά με το asfame.gr";
parameters.description=action.Post.Description;
string feedtype = "";
if (action.Type == ActionType.Comments)
    feedtype = "comments";
else
    feedtype = "feed";
parameters.method = feedtype;
result = Client.Post(parameters);
rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
  • possible duplicate of [Posting to friends' feed stopped working on Feb 6th 2013](http://facebook.stackoverflow.com/questions/14792062/posting-to-friends-feed-stopped-working-on-feb-6th-2013) – Igy Feb 11 '13 at 18:54

1 Answers1

1

Facebook has removed the ability to post on friends wall from 6th feb,2013. checkout the official doc here http://developers.facebook.com/roadmap/completed-changes/ under subsection Removing ability to post to friends walls via Graph API from February 6, 2013 changes. Hope it helps.

Smita
  • 4,634
  • 2
  • 25
  • 32
  • Hi, an application on App Store 'Happier' posts on friend's timeline. It uses feed dialog.. I don't know how it works but it does. Can you please help me on this? – iOS Monster Apr 24 '13 at 04:16