简体   繁体   English

Facebook图像未在Cordova应用程序的ios版本中显示

[英]Facebook images are not shown in ios version of cordova app

I'd like to display the facebook profile image when a user had logged in via facebook. 当用户通过Facebook登录时,我想显示Facebook个人资料图像。 The images from the domain graph.facebook.com are not shown in the ios version of my app. 来自域graph.facebook.com的图像未显示在我的应用程序的ios版本中。 It works fine in browser and android as well. 它在浏览器和android中也能正常工作。 I added the access rules (I'm using meteor) 我添加了访问规则(我正在使用流星)

App.accessRule("*"); 
App.accessRule("graph.facebook.com");

but it didn't help. 但这没有帮助。

In my case the problem was caused because I was referencing the Facebook images inside my app with an 'http' link when my server site was running on a secure site 'https'. 就我而言,问题是由于服务器站点在安全站点“ https”上运行时,我使用“ http”链接引用了应用程序内的Facebook图像。 iOS had blocked all links to insecure sites inside a secure site. iOS已阻止到安全站点内不安全站点的所有链接。

The solution was change the fb links to https: 解决方法是将fb链接更改为https:

https://graph.facebook.com/10154217231etc....

Actually FB serves his resources in both http and https sites. 实际上,FB在http和https站点中都提供他的资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM