facebook-csharp-sdk / facebook-csharp-sdk Goto Github PK
View Code? Open in Web Editor NEWFacebook SDK for .NET
Home Page: https://github.com/facebook-csharp-sdk/facebook-csharp-sdk
License: Apache License 2.0
Facebook SDK for .NET
Home Page: https://github.com/facebook-csharp-sdk/facebook-csharp-sdk
License: Apache License 2.0
add readme.md
a wiki page mentioning the git workflow used for Facebook C# SDK
similar to ResolveCanvasUrl(), we need ResolveTabUrl()
move GetLoginUrl from FacebookOAuthClient to FacebookClient (#37)
Here is how the query method looks like in v5. It was moved to using graph api but inorder to maintain compatibility with older versions the sdk automatically added return result["data"];
public virtual object Query(params string[] fql)
{
if (fql == null)
throw new ArgumentNullException("fql");
if (fql.Length == 0)
throw new ArgumentException("At least one fql query required.", "fql");
var queryDict = new Dictionary<string, object>();
for (int i = 0; i < fql.Length; i++)
{
queryDict.Add(string.Concat("query", i), fql[i]);
}
var parameters = new Dictionary<string, object>();
parameters["q"] = queryDict;
var result = (IDictionary<string, object>)Get("fql", parameters);
return result["data"];
}
Make it (for Query/QueryAsync methods)
public virtual object Query(params string[] fql)
{
if (fql == null)
throw new ArgumentNullException("fql");
if (fql.Length == 0)
throw new ArgumentException("At least one fql query required.", "fql");
var queryDict = new Dictionary<string, object>();
for (int i = 0; i < fql.Length; i++)
{
queryDict.Add(string.Concat("query", i), fql[i]);
}
var parameters = new Dictionary<string, object>();
parameters["queries"] = queryDict;
parameters["method"] = "fql.multiquery";
return Get(parameters);
}
Facebook OAuth Client should internally use FacebookClient. This also means that FacebookClient should be able to parse text/html content type when path is "oauth/access_token"
currently it includes only
if (url.Host == "graph.facebook.com" || url.Host == "graph-video.facebook.com")
need to add support for
Support for gzip.
Note:
metion about handling oauth exception, api limit exception and also exceptions when there is no internet.
remove IJsonSerializer interface and add it as a static method/property to FacebookClient
FacebookClient.SetJsonSerializer(Func<object,string> serializeObject, Func<string,Type,object> deserializeObject);
FacebookClient.SerializeObject(object obj);
FacebookClient.DeserializeObject(string json, Type type);
mention about git line endings
git config --global core.autocrlf false
update rakefile to generate the following assembly info data.
[assembly: AssemblyVersion("6.0.0")]
[assembly: AssemblyFileVersion("6.0.0-beta")]
Add a wiki page containing links to various useful links to the official Facebook website such as graph explorer tool, docs and so on.
Unlisting a package hides the package from search results and all NuGet commands, but packages are still available for download. For example, they can still be downloaded as dependencies to other packages.
this means your package cannot be installed directly and it will not show up in search results.
will need to most probably introduce a new class called FacebookMediaStream.
General questions like:
http://msdn.microsoft.com/en-us/library/hh202955(v=VS.92).aspx
With Windows Phone OS 7.1, applications are able to queue up one or more file uploads or downloads over HTTP that will be executed in the background, even when the application is no longer running in the foreground. The APIs used for initiating file transfers should be used to query the status existing transfers and provide progress indicators for the end user.
add a wiki page with list of community written links such as blog posts/video tutorials
Instead of having FacebookOAuthClient.ExchangeCodeForAccessToken FacebookClient should be able to handle "oauth/access_token".
GetLoginUrl should be moved to FacebookClient
GetApplicationAccessToken would be unnecessary.
currently there are a lot of unnecessary codes in Facebook.Web.dll and Facebook.Web.Mvc.dll. Most of which will not make sense in the presence context. We will need to rewrite every part of Web and Mvc.
I think only FacebookWebClient would be necessary and all other classes can be removed from Facebook.Web.dll and we can totally get rid of Facebook.Web.Mvc.dll
Facebook subscriptions should be made as an example rather than part of the Web and Mvc.
FacebookSession and FacebookSignedRequest can be totally removed. We can rather have the following method.
var fb = new FacebookWebClient(); // new FacebookWebClient(HttpContext.Current)
dynamic signedRequest = fb.ParseSignedRequet();
string accesstoken = signedRequest.access_token;
var uid = signedRequest.uid;
Remove obsolete FacebookApp and FacebookAsyncResult (these were the old way in v4 using async callback instead of event handlers for async methods).
Remove FacebookWebAuthorizer and CanvaAuthorizer. These should be shown as samples instead or even as a seperate nuget package containing the .cs file.
Remove CanvasUrlBuilderExtensions.
Remove FacebookAppRedirectHttpHandler. This has always been causing lot of redirect loop issues and still does not correctly work when lot of users are running inside a nested folders.
I think it might be best to set the redirect_uri as just context.Request.Url instead of having a custom redirect http handler.
If we find code in the querystring we can call ExchangeCodeForAccessToken and then redirect to the same url, if we find error and error_description in the querystring, we can then show the error. But disadvantage to this is performance as we will need to parse the querystring for every request.
added ParseSignedRequest to FacebookOAuthClient as virtual methods and also add TryParseSignedRequest alternatives.
[Update]
changed title from "add FacebookOAuthClient.ParseSignedRequest" to "add FacebookClient.ParseSignedRequest"
change the following code
var url = "http://www.facebook.com/dialog/oauth/?" + FacebookUtils.ToJsonQueryString(mergedParameters);
to use secure https url instead (in FacebookOAuthClient.GetLoginUrl). Will most probably require updating unit tests too.
https://developers.facebook.com/blog/post/627/
We would most probably want a method that looks similar to this.
dynamic result = fb.Api("GET", "me", new { fields = new { "id", "name"}, etag = "...." });
dynamic headers = result.headers;
dynamic etag = result.headers.etag;
dynamic body = result.body;
Then result.body actually contains the actual json result.
etag parameter is a special parameter like the "access_token" parameter. it should be set as a request header instead of normal parameter.
make JsonObject and JsonArray private
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.