'How to access FaceBook Ads API using ASP.NET

I wish to access the FaceBook Ads API using the FaceBook toolkit for .NET (which i found in codeplex.com)

Wish to access the ads.estimateTargetingStats in particular .

details of FaceBook Ads API

FaceBook Ads API reference

Are there any frameworks(in .NET) developed around the FaceBook APIs . I am aware of

  1. FaceBook Toolkit ,
  2. FaceBook .NET

both are from codeplex.

Does someone let me know how to achieve the above quoted requirement with any .NET framework ?



Solution 1:[1]

Update: As stated on the repository, the project is no longer being maintained.


For those still looking for an answer, I recently released an unofficial SDK for C#. The code is available on GitHub here.

It implements most of the GET requests that are available by acting as a wrapper for the Facebook SDK for C#. Hope it helps anyone at all.

Solution 2:[2]

The SDK I developed called the Facebook .Net SDK will do this. http://facebooksdk.codeplex.com The SDK supports .Net 3.5 and .Net 4.0. If you can, I would recommend using .Net 4.0 as the experience will be better.

Example code using dynamic on .net 4.0 would be:

FacebookApp app = new FacebookApp();
dynamic parameters = new ExpandoObject();
parameters.method = "ads.estimateTargetingStats";
parameters.account_id = "account_id";
parameters.targeting_spec = new List<string> { "spec1", "spec2" };
parameters.currency = "USD";
dynamic result = app.Api(parameters);
// from here just access the properties dyanmically
string s = result.something; // I dont remember exactly what all the return values are. You can view the dynamic result if you set a breakpoint when debugging.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Nate Totten