问题描述
我的公司有一个企业的Facebook帐户,他们在不同的专辑中发布活动照片。我的要求是从Facebook相册中获取所有照片,并在我们的公司网站上显示。我可以获取照片,但用户访问令牌仅在60天内有效,这意味着每隔两个月,我将不得不登录公司的公司Facebook帐户,重新生成令牌并更新我的应用程序中的令牌。
有没有办法生成永久访问令牌?
或者还有什么办法在我的应用程序级别重新生成令牌(不显示登录对话框)?
有没有其他方法来获取照片,没有创建应用程序?
移动到Oauth 2.1
它实际上更简单 - 使用你的App ID + App Secret访问令牌
,然后您可以通过
(从)
My company has a corporate facebook account where they post event pics in different albums.My requirement is to get all the photos from facebook albums and show in our corporate website. I am able to fetch the photos but the user access token is valid only for 60 days which means every other two months i will have to login into company's corporate facebook account, regenerate the token and update the token in my application.
Is there any way to generate to permanent access token?or is ther any way to regenerate the token at my application level ( without showing login dialog box)?
Is there any other way to fetch the photos without creating app?
moving to Oauth 2.1it is actually MUCH simpler - use your App ID + App Secret as access tokenyou can then access the feed (etc) via https://graph.facebook.com/v2.1/theO2/feed?access_token=app_id|app_secret
(from Facebook documentation on Access Tokens)
这篇关于Facebook - 永久性用户访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!