问题描述
我希望使用Facebook工具包访问的 Facebook广告API用于.NET (我发现在codeplex.com)
I wish to access the FaceBook Ads API using the FaceBook toolkit for .NET (which i found in codeplex.com)
要访问的 ads.estimateTargetingStats 特别。
Facebook广告API的细节
details of FaceBook Ads API
Facebook广告API参考
FaceBook Ads API reference
是否有周围FaceBook的API的开发的任何框架(.NET中)。我知道
Are there any frameworks(in .NET) developed around the FaceBook APIs . I am aware of
- FaceBook的工具包,
- Facebook的.NET
都是从 codePLEX
是否有人让我知道如何实现与任何.NET框架上面引述的要求?
Does someone let me know how to achieve the above quoted requirement with any .NET framework ?
推荐答案
我开发了名为Facebook的净SDK的SDK将做到这一点。 SDK支持的.Net 3.5和.Net 4.0 。如果可以的话,我会建议使用.NET 4.0的体验会更好。
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.
举例code将是:
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.
这篇关于如何使用ASP.NET访问Facebook广告API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!