c# - facebook 营销 API 错误 803 c#
问题描述
试图做
https://developers.facebook.com/docs/marketing-api/buying-api
令牌是一个沙盒令牌
得到错误:{“错误”:{“消息”:“(#803)一些别名您请求的不存在”
是一个帐户 ID 错误
,我从以下网址获得了帐户 ID:https
://www.facebook.com/adsmanager我什至尝试了我的 Facebook 页面 ID 或来自:https://developers.facebook 的应用 ID。 com/应用程序/
不知道还有什么可以尝试的任何人都知道如何处理这个错误?
static void Main(string[] args)
{
string test = postrequestAsync().GetAwaiter().GetResult();
Console.WriteLine(test);
}
private static async System.Threading.Tasks.Task<string> postrequestAsync()
{
/*
'name=My campaign' \
-F 'objective=LINK_CLICKS' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v3.0/act_<AD_ACCOUNT_ID>/campaigns
*/
try
{
var values = new Dictionary<string, string>
{
{ "name", "My campaign" },
{ "objective", "LINK_CLICKS" },
{ "status", "PAUSED" },
{ "access_token", token }
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync(" https://graph.facebook.com/v3.0/act_<"+accountid+">/campaigns", content);
var responseString = await response.Content.ReadAsStringAsync();
return responseString;
}catch(Exception e)
{
return e.Message;
}
}
解决方案
推荐阅读
- javascript - 如何使用 Node & Express 启动我的 MYSQL 数据库?
- gradle - 如何在 gradle 中包含 sprint 云依赖项
- javascript - 如何在触发的单元格中自动添加包含单元格历史记录的注释?
- angular - 如何在 SharePoint 上托管 Angular Web 应用程序
- javascript - 获取数组对象中的连续元素
- c++ - 在 C++ 中使用 RAII 在线程包装类中移动语义
- javascript - AJAX 切换 HTML
- entity - 如何在 EFCore 3.1 中使用脚手架流程更新我的实体 - 执行超时已过期
- python - 如何在python数据框中取消嵌套元组
- python - 在 ImageNet 示例代码中使用 Pytorch 分配特定 GPU