我们可以使用 facebook Graph api 更改 facebook 应用程序邀请文本吗?
一般有格式——“邀请人姓名给你发了请求”,我们可以把这个文本替换成我们自己的吗?
(这会在 fb 墙上显示为通知。)
我正在使用下面的代码 -
- (void)load:(BOOL)NeedToSendAppRequest AndMessage:(NSString*)message AndFriendID:(NSString*)friendID {
NSString *urlString = nil;
isNeedToSendAppRequest = NeedToSendAppRequest;
if (NeedToSendAppRequest) {
NSString *redirectUrlString = FACEBOOK_REDIRECT_URL;
NSString *authFormatString = @"https://m.facebook.com/dialog/apprequests?app_id=%@&target_url=fb%@&to=%@&message=%@&redirect_uri=%@";
urlString = [NSString stringWithFormat:authFormatString, _apiKey, _apiKey,friendID,message,redirectUrlString];
}else{
NSString *redirectUrlString = @"http://www.facebook.com/connect/login_success.html";
NSString *authFormatString = @"https://graph.facebook.com/oauth/authorize?client_id=%@&redirect_uri=%@&scope=%@&type=user_agent&display=touch";
urlString = [NSString stringWithFormat:authFormatString, _apiKey, redirectUrlString, _requestedPermissions];
}
NSURL *url = [NSURL URLWithString:urlString];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[_webView loadRequest:request];
}