作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在我的 Facebook 页面上发布状态。状态应该在 Facebook 上显示为页面状态,而不是来自任何用户名或我的名字的状态。
我试过下面的代码,
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:@"This is a check for page post message", @"message", nil];
/* make the API call */
[FBRequestConnection startWithGraphPath:@"/1521177224766299/feed"
parameters:params
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error){
if (result)
{
NSLog(@"Result %@", result);
}
else
{
NSLog(@"%@", error);
}
}];
消息状态已发布完成页面墙,但该状态来 self 的名字。但是,当我尝试使用 page_id/feed POST 查询和相同的参数 @"this is my status"@"message"从 graph api explorer 页面点击相同的 post 方法时,它从不是我的页面发布状态。
请帮忙。
最佳答案
NSString *accesstoken=[NSString stringWithFormat:@"%@","here add your page access_token"];
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
accesstoken, @"access_token",
postingString, @"message",
// @"http://www.real-timesports.com", @"link",
nil];
FBRequest *requestToPost = [[FBRequest alloc] initWithSession:nil
graphPath:@"/me/feed"
parameters:params
HTTPMethod:@"POST"];
NSLog(@"requestToPost==%@",requestToPost);
FBRequestConnection *requestToPostConnection = [[FBRequestConnection alloc] init];
[requestToPostConnection addRequest:requestToPost completionHandler:^(FBRequestConnection *connection, id result, NSError *error)
{
NSLog(@"facebook result >> %@", result);
}];
[requestToPostConnection start];
关于ios - 如何在 iOS 中以 pageadmin 身份在 Facebook 页面上发布状态提要?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26141394/
在使用内联扩展 PageAdmin 类时,我似乎遇到了权限问题。 从我的调试来看,我似乎无权添加管理内联,因为 PageAdmin 中的以下方法返回空列表。 def get_inline_classe
我想在我的 Facebook 页面上发布状态。状态应该在 Facebook 上显示为页面状态,而不是来自任何用户名或我的名字的状态。 我试过下面的代码, NSDictionary *params =
我是一名优秀的程序员,十分优秀!