0

This is the code:

fb = new FacebookClient("access token");
            dynamic parameters = new ExpandoObject();
            parameters.message = "Check out this funny article";
            parameters.link = "http://www.example.com/article.html";
            parameters.picture = "http://www.example.com/article-thumbnail.jpg";
            parameters.name = "Article Title";
            parameters.caption = "Caption for the link";
            parameters.description = "Longer description of the link";
            parameters.actions = new
            {
                name = "View on Zombo",
                link = "http://www.zombo.com",
            };
            parameters.privacy = new
            {
                value = "ALL_FRIENDS",
            };
            parameters.targeting = new
            {
                countries = "US",
                regions = "6,53",
                locales = "6",
            };
            dynamic result = fb.Post("me/feed", parameters);

I keep getting this exception:

(OAuthException - #2500) An active access token must be used to query information about the current user

On the line:

dynamic result = fb.Post("me/feed", parameters);

Why ?

Doron Muzar
  • 443
  • 1
  • 10
  • 26
  • Duplicate? http://stackoverflow.com/q/5171309/945456 – Jeff B Nov 26 '13 at 22:41
  • How did you obtain the token? It's called an access token not app token. – maxbeaudoin Nov 26 '13 at 22:42
  • There are different types of access token, if you're using an app access token and trying to access '/me/' that won't work because you haven't identified which user you're trying to access, so there is no **me** – Igy Nov 26 '13 at 22:56
  • I changed my question with updated code i got my access token but i keep getting the exception on this line why ? – Doron Muzar Nov 26 '13 at 23:17
  • Tried to put instead me my facebook user name which is my email but same exception. – Doron Muzar Nov 26 '13 at 23:17
  • Tried with my user name: dynamic result = fb.Post("Daniel Lip/feed", parameters); but i get : (OAuthException - #803) (#803) Some of the aliases you requested do not exist: Daniel Lip – Doron Muzar Nov 26 '13 at 23:19
  • Please look at some sample code or the API docs, it's not possible to access a user via their first and last name, those are not a unique identifier - you can use the user ID or username there, not their actual name – Igy Nov 26 '13 at 23:34

0 Answers0