使用 ShareKit 将图像发布到 Facebook

发布于 2025-01-02 18:42:58 字数 427 浏览 3 评论 0原文

到目前为止,我已经成功安装 ShareKit 并将其发布到 Twitter、电子邮件和相册。很容易。

但现在我正试图将其发布到 Facebook。我只是通过 Facebook 的操作表使用默认按钮。

我已在 ShareKit 文件的配置中填写了 App ID。我还在 info.plist 中添加了 CFBundleURLType 内容。

问题是,当我点击“发布到 Facebook”按钮时,我被重定向到我的本机 Facebook 应用程序,我看到一个对话框,显示“正在加载...”1 秒钟,然后我被重定向回我的应用程序。第一次尝试(没有应用程序权限)时,它会要求我允许该应用程序,这样部分就可以了。然而,它并没有发布或要求我发布图像。

我缺少什么?可以直接发图片到FB吗?或者它必须首先是一个 URL 或者其他什么?另外,我是否应该通过 FB 应用程序设置启用 SSO?谢谢

I've been successful so far in installing and getting ShareKit to post to Twitter, Email, and Photo Album. Easy enough.

However now I'm trying to get it to post to Facebook. I'm simply using the default button through the actionsheet for Facebook.

I have filled in App ID in the config of my ShareKit file. I have also added the CFBundleURLType stuff in the info.plist.

The issue is when I hit the "Post to Facebook" button, I get redirected to my native Facebook app, I see a dialog box that says "Loading..." for 1 second, then I'm redirected back to my app. Upon first try (without app permissions), it'll ask me to allow the app, so that parts just fine. However it's not posting or asking me to post the image.

What am I missing? Am I able to directly post images to FB? Or does it have to be a URL first or something? Also, am I suppose to enable SSO via the FB app settings? Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

欲拥i 2025-01-09 18:42:58
#import "SHK.h"
#import "SHKFacebook.h"

SHKItem *item = [SHKItem image:[UIImage imageNamed:@"yourImage.png"] title:imageTitle];
[SHKFacebook  shareItem:item];
#import "SHK.h"
#import "SHKFacebook.h"

SHKItem *item = [SHKItem image:[UIImage imageNamed:@"yourImage.png"] title:imageTitle];
[SHKFacebook  shareItem:item];
驱逐舰岛风号 2025-01-09 18:42:58

抱歉,我应该更彻底地阅读文档。

第 7 步: https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit

My apologies, I should have read the documentation more thoroughly.

Its step 7: https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文