I use c# SDK to fetch pages.isfan data , but it always error.
var args=new Dictionary<string,object>();
args["uid"] = fb_uid;
args["page_id"] = _isfan_page_id;
var isfanobj = (IDictionary<string, object>)fb.Api("pages.isfan", args);
foreach (KeyValuePair<string, object> entry in isfanobj)
{
Response.Write(
string.Format("key:{0}\nvalue:{1}\n",
entry.Key,entry.Value
)
);
}
pages.isfan need 2 parameters: page_id and uid
loop iterate my “isfanobj” , a dictionary type, the “key” always be “error”.
Is my code any wrong?
If wrong, how do I get pages.isfan data?
Thanks for your help!!!
this is what I user and it works great for me.
I find the fb.Api signature that you pass in all the parameters as a Dictionary works best for me.
I just wanted to add that when dealing with the REST API it is not the same as dealing with the Graph API you have to pass in the method as a parameter.
Also once the Rest API is fully deprecated we will all have to switch to the new method… If they ever come out with it.
Cheers