CrossGeeks / FacebookClientPlugin

Facebook Client Plugin for Xamarin iOS and Android
MIT License
106 stars 32 forks source link

Unknown path components: /Get #5

Closed TimotejRybar closed 6 years ago

TimotejRybar commented 6 years ago

Hello again :D

using this call

var resp = await CrossFacebookClient.Current.QueryDataAsync("me/friends", new string[] { "user_friends" }, new Dictionary<string, string>{{ "fields","id,name"}},"2.11"); // any API version

i'm getting empty data with error and this message: Unknown path components: /Get

wit this call

var resp = await CrossFacebookClient.Current.QueryDataAsync("me/friends", new string[] { "user_friends" }); message: Some of the aliases you requested do not exist: Get

please look at it in your spare time, i've been implementing fb api calls into my own api all day although it was fun.

Thank you very much for this brilliant library

Best regards,

Timotej

rdelrosario commented 6 years ago

Ok will check it thanks for reporting. I might have an idea of what’s going on try this:

var resp = await CrossFacebookClient.Current.QueryDataAsync("me/friends?fields=id,name”, new string[] { "user_friends" });

Let me know if that works

TimotejRybar commented 6 years ago

same result :(

(#803) Some of the aliases you requested do not exist: Get

rdelrosario commented 6 years ago

Mmmm maybe I missed a / did you tried /me/friends

TimotejRybar commented 6 years ago

Still that same error

Some of the aliases you requested do not exist: Get

rdelrosario commented 6 years ago

Ok will be checking this

TimotejRybar commented 6 years ago

Hi friend, i've managed to fix your code and now it works as it should

in Plugin.FacebookClient.Android/FacebookClientManager.cs

async void RequestData(Dictionary <string, object> pDictionary) { //string path,Bundle parameters = null,HttpMethod method = null,string version = null string path = $"{pDictionary["method"]}"; // }

should be

string path = $"{pDictionary["path"]}";

Cheers!

rdelrosario commented 6 years ago

Thanks for figuring out! I just publish a new version with the fix.