如何使Facebook的图形API在本地主机上工作? [英] How can I make Facebook's graph API work on my localhost?
问题描述
有没有人对此有任何建议问题?
如果您不需要离线访问(不可用,请参阅Jimmy Sawczuk的回答),但只需要您的网站能够从您的本地主机访问Graph API,而不是真正的域名,应该是可能的。
您需要做的是编辑您的网站在Facebook上的应用程序。将您的应用程序URL设置为localhost或您的计算机本地IP地址,我认为它应该有效。
the title might suggest it, but i'm looking for a way to have Facebooks graph API work on my localhost. It's a pain if I need to sync up the project to the server every time I want to test, because graph only works when online.
Does anyone have any suggestions on this problem?
If you don't need offline access (which is not available, see Jimmy Sawczuk's answer), but only need your website to be able to access the Graph API from your localhost instead of the real domain name, it should be possible.
What you need to do is edit the settings for your site's app on Facebook. Set your applications URL to either 'localhost' or your computers local IP-address, and I think it should work.
这篇关于如何使Facebook的图形API在本地主机上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!