使用FB.FeedShare(),并包括上传图片 [英] Using FB.FeedShare(), AND including the upload of an image

查看:315
本文介绍了使用FB.FeedShare(),并包括上传图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Unity3D游戏中,连接到FB(无论是否使用新的FB Unity API,每个人都经常使用的p31插件或编写自己的插件)

In a Unity3D game, connecting to FB (whether using the new FB Unity API, the p31 plugins everyone has usually used, or writing one's own plugin),

使用我/照片"或我/照片",您确实可以上传图像(我的意思是发送字节数组).

Using "me/photos" or "me/photos" you can indeed upload images (I mean literally send an array of bytes).

假设您实际上想要使用 FB.FeedShare().

请注意,您可能要这样做有两个原因:

Note, there are two reason you may want to do this:

(1)对话框很棒,您可能更喜欢将其用于用户的乐趣

(1) the dialog is great, you may prefer to use it for user's pleasure

(2),使用FB.FeedShare()不需要从用户或您的应用程序获得太多权限.

(2) you do not need to get so many permissions from the user or for your app, to use FB.FeedShare().

事实上.

有人能果断地知道...

Does anyone know decisively...

是否可以通过FB.FeedShare()添加图片?

Is there a way to include an image with FB.FeedShare()?

如果可以,怎么办?

如果答案是绝对不是",那么知道这一点将是很好的.

If the answer is "absolutely no" it would be great to know that.

(当然,您可以包括图像的URL.可以将生成的PNG交叉发布到某个网站,然后提供URL.但是,的确,如果FB反对该程序,我不会感到惊讶-也许FB系统会检测到并禁止它,我不知道.)

(Of course you can include a URL of an image. One could cross-post the generated PNG to some web site, and then give the URL. But indeed, I wouldn't be surprised if FB is against that procedure - perhaps the FB systems detect this and ban it, I don't know.)

推荐答案

是否可以通过FB.FeedShare()包含图像?

Is there a way to include an image with FB.FeedShare()?

否,这是不可能的-它必须是可公开访问的HTTP(S)URL.

No, that is not possible - it has to be a publicly reachable HTTP(S) URL.

但是将图像发布到其他地方,以便可以通过HTTP从那里请求它就很好了; Facebook对此没有任何问题. (但是,如果您是许多其他用户之一,则不要为此选择任何免费托管人"平台-如果其中一个用户行为不当并张贴了不适当的图像,则域/服务器IP可能会被阻止,那么您的图像将无法工作也没有.)

But posting the image to somewhere else, so that it can then be requested from there via HTTP, is perfectly fine; Facebook has no problem with that. (But don’t choose any "free hoster" platform for that where you are one of lots of other users - if one of them misbehaves and posts inappropriate images, the domain/server IP might get blocked, and then your image would not work any more either.)

我猜想有一种想法是先将其发布到用户自己的一个相册中.然后尝试那个把戏?他们不允许吗?

I guess there's the idea of posting it first to indeed one of the user's own albums; and then trying that trick? they don't allow it?

不确定在这种特殊情况下,您必须尝试看看它是否有效.

Not sure about it in this particular situation, you'd have to try and see if it works.

但是,当您将og:image元标记放入文档中并让FB刮板从那里获取图像时,它们不允许您在Facebook上使用图像.在调试工具中将给出错误消息,提示不允许使用来自Facebook CDN的图像.因此,通过其他方式(例如Feed对话框)共享链接时,可能会是相同的.

But they don't allow you to use images "on" Facebook when you put an og:image meta tag into a document and have the FB scraper fetch it from there; in the debug tool that will give an error message saying using images from Facebook's CDN is not allowed. So it might be the same when sharing a link via other means such as the Feed dialog.

这篇关于使用FB.FeedShare(),并包括上传图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆