如何使Facebook的图形API在本地主机上工作? [英] How can I make Facebook's graph API work on my localhost?

查看:95
本文介绍了如何使Facebook的图形API在本地主机上工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题可能会建议,但我正在寻找一种方法让Facebook的图形API在我的本地主机上工作。如果我需要将项目同步到服务器,每次我想测试,这是一个痛苦,因为图表仅在线上工作。



有没有人对此有任何建议问题?

解决方案

如果您不需要离线访问(不可用,请参阅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屋!

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