为什么Facebook不能分享我的Firebase存储映像文件? [英] Why can't Facebook share pick up my Firebase storage image file?
问题描述
我有以下按钮:
< a class =btn btn-social btn-facebookhref = https://www.facebook.com/dialog/feed?app_id=1732jjjjjjj
& redirect_uri = {{statusUrl}}
& link = https://sitename.com/ {{statusUrl} }
& name = {{isTitle}}
& picture = https://firebasestorage.googleapis.com/v0/b/rrrr.appspot.com/o/eWebcontent%2Fc0638f6c65d2aa5c81f9ef820531eda2?alt = media& token = 93c157e6-05ec-4efe-8ca5-86942cfac742
& caption = www.sitename.com
& author = Author
& description = {{statusDesc}}
& properties = {text:'value1',key2:'value2'}
& actions = {name:'我爱你',链接:'https://www.sitename.com' }&&
display = popup>
除了图像不显示外,其他一切工作正常。
它只是显示一个空格。
这是一个页面的网站,所以我可以用打开的图表元标签来做很多。 >
为什么Facebook不能显示图像?
如我所知,这里的问题与处理字符转义不同的网站有关。
您的图片命名为 eWebcontent%2Fc0638f6c65d2aa5c81f9ef820531eda2
,因为Firebase Storage已将 /
编码为%2F
。我假设Facebook(和其他一些网站)尝试对%
字符(%25
)进行重新编码,这意味着Facebook实际上正在寻找一个名为 ...%252F ...
的图片,而不是找到它。不幸的是,我似乎无法使用其他百分号编码的字符重现这个问题,所以我感到困惑,如果它不知何故只是一个问题, /
或什么。
目前的解决方案是简单地不要将 /
s放在你的URL中(例如只是命名你的图像 c0638f6c65d2aa5c81f9ef820531eda2
或某事。
I have the following button:
<a class="btn btn-social btn-facebook" href="https://www.facebook.com/dialog/feed?app_id=1732jjjjjjj
&redirect_uri={{statusUrl}}
&link=https://sitename.com/{{statusUrl}}
&name={{isTitle}}
&picture=https://firebasestorage.googleapis.com/v0/b/rrrr.appspot.com/o/eWebcontent%2Fc0638f6c65d2aa5c81f9ef820531eda2?alt=media&token=93c157e6-05ec-4efe-8ca5-86942cfac742
&caption=www.sitename.com
&author=Author
&description={{statusDesc}}.
&properties={text:’value1′,key2:’value2′}
&actions={name:’I LOVE u’,link:’https://www.sitename.com’}&&
display=popup">
Everything else works fine, except that the image doesn't show up. It just shows a blank space.
It's a one page site, so there is not much I can do with the open graph meta tags.
Why isn't facebook able to show the image?
As far as I can tell, the issue here has to do with websites handling character escaping differently.
Your image is named eWebcontent%2Fc0638f6c65d2aa5c81f9ef820531eda2
since Firebase Storage has encoded the /
as %2F
. I assume that Facebook (and some other sites) try to re-percent encode the %
character (%25
), meaning that Facebook is actually looking for an image named ...%252F...
, and not finding it. Unfortunately, I can't seem to reproduce this using other percent encoded characters, so I'm confused if it's somehow just an issue with /
or what.
The current solution is to simply not place /
s in your URLs (e.g. just name your image c0638f6c65d2aa5c81f9ef820531eda2
or something.
这篇关于为什么Facebook不能分享我的Firebase存储映像文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!