- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在向群组用户墙发帖(图片和文字)。它已经工作了很长时间,最近停止工作(现在,图像已发布,但没有文字:()。知道是否有新的方法或规则?(没有错误报告)
[params setObject:sContent forKey:@"message"];
[params setObject:yourImageData forKey:@"picture"];
[[[FBSDKGraphRequest alloc]
initWithGraphPath:@"xxxxxxxxxxxxxxx/photos"
parameters: params
HTTPMethod:@"POST"]
startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (!error) {
最佳答案
以下是我的工作代码(在 Swift 中):
let params = ["message": "Test message", "sourceImage" : UIImagePNGRepresentation(UIImage(named: "test.jpg")!)!]
FBSDKGraphRequest(graphPath: "me/photos", parameters: params, HTTPMethod: "POST").startWithCompletionHandler({ (connection, result, error) -> Void in
guard let response = result else {
print("No response received")
if let errorInfo = error {
print("errorInfo: \(errorInfo)")
}
return }
print(response)
})
关于xcode - FBSDKGraphRequest 不能再发布图像和文本(不再有文本),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35977834/
虽然我已经导入了 FacebookSDK,例如:#import ,但它说:使用未声明的标识符“FBSDKGraphRequest”。 我写的代码很简单: FBSDKGraphRequest *req
我在获取封面个人资料图片时遇到困难... 这里我得到了个人资料图像: let userProfile = "https://graph.facebook.com/" + userId + "/pict
我正在尝试使用以下代码从 Facebook 页面读取帖子: class FacebookGraphAPI { class func getPosts(fromPageWithID pageId
最近几天我一直在尝试让 Facebook SDK 在 IOS swift 上运行。我可以正常登录,但无法获取个人资料信息。代码如下。 在此输入代码 func fetchProfile() {
我正在使用 FBSDKGraphRequest 在我的 iOS 应用程序中实现 Facebook 登录。 但是在登录完成并且用户确认后,我没有被重定向到我的应用。 这是我的代码: FBSDKGraph
我有兴趣从 Facebook 获取用户的性别。设备区域设置为俄语。代码: let FBRequest = FBSDKGraphRequest( graphPath: "me", par
我正在向群组用户墙发帖(图片和文字)。它已经工作了很长时间,最近停止工作(现在,图像已发布,但没有文字:()。知道是否有新的方法或规则?(没有错误报告) [params setObject:s
我正在开发一个使用 Facebook 联系人的应用程序。我将这些联系人保存在本地核心数据数据库中,以便在没有连接时使用它们。不幸的是,当我访问有形的 friend ID 时,我得到了不同的 UUID
我正在尝试更新隐私参数,以便我的应用启动的实时视频发布在用户的时间轴上,并将隐私设置为“ALL_FRIENDS”。我查看了文档,我提出的代码不起作用: NSString* livePath = [@
我正在构建一个用于检索用户个人资料图片的函数。我正在使用 facebook 的 FBSDKGraphRequest,但是当我尝试使用检索到的数据将其分配到图片中时,我收到一个我不明白的错误:Varia
在用户成功登录后,我遇到了 Facebook SDK(swift 4、Xcode 9)的问题,我试图撤回有关用户帐户的一些详细信息,例如他们的电子邮件地址、姓名和图片。 但是下面的代码在这一行给我一个
我正在尝试在按下 Facebook 登录按钮时执行的代码块中使用 FBSDKGraphRequest。但是,由于某种原因,这段代码永远不会执行。可能是什么原因。我使用的按钮是 FBSDKLoginBu
我收到以下异常: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDi
我正在使用 Parse 在我的应用程序上通过 facebook 登录。 这是我的代码: //set permissions required let permissionsArray
我正在使用 Facebook SDK 注册我的用户。我正在尝试使用 FBSDKGraphRequest 保存用户个人资料图片。我得到的是以下结果: { email = "adolfosrs@g
我是编码的新手,但我有一个大问题:) 我不知道如何从 FBSDKGraphRequest 获取信息以显示在主 Storyboard上。 接下来我应该怎么做才能将图片添加到 Storyboard?我希望
我正在使用 Xcode 10、Swift 5,我正在尝试将 UITextField 设置为我从 Facebook 检索到的用户名。我已在结果中成功检索到 ID、电子邮件和姓名,但是当我将结果发送到文本
我一直在尝试使用 FBSDKGraphRequest 上传带有标题和标记 friend 的照片,但我真的很难让标签起作用。这是我得到的: NSDictionary *parameters = @{
我想检查我当前的 Facebook token (它存在)是否仍然具有用户授予的所有所需权限。 因此,我调用该图来检索与我的 token 关联的所有授予的权限: FBSDKGraphReque
教程应用程序的 SignUpViewController 中使用的 FBSDKGraphRequest 连接处理程序现已过时。我将其更新到在用户成功注册后尝试放置解析代码之前不会出错的程度。一旦我输入
我是一名优秀的程序员,十分优秀!