prabirshrestha / FacebookSharp

Facebook Graph API for .Net
Other
30 stars 15 forks source link

Support for OLD Rest Api and FQL #7

Open prabirshrestha opened 14 years ago

prabirshrestha commented 14 years ago

Old rest api support was not initially planned.

But since facebook graph api doesn't support most of the features, i think its crucial to have it.

All methods using RestApi will be marked as [Obsolete] to discourage using it. Use the rest api only if you can't do it by Graph Api.

prabirshrestha commented 14 years ago

to differentiate graph api and old rest api, the methods will be similar to graph api methods, execpt with different method name as below.

[Obsolete("Use the graph api Get() if possible.")] public string GetUsingRestApi(string methodName, IDictionary<string, string> parameters);

methods names will have "UsingRestApi" appended to it.

prabirshrestha commented 14 years ago

partial old rest api implemented for synchronous methods.

[Obsolete("Use the graph api Get() if possible.")] public string GetUsingRestApi(string methodName, IDictionary<string, string> parameters){}

var result = fb.GetUsingRestApi("friends.get");

sync FQL also implemented

var result = fb.Query("SELECT uid from users");