问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/42477174/why-cant-facebook-share-pick-up-my-firebase-storage-image-file