English 中文(简体)
Facebook——通过Cronjob获得用户
原标题:Facebook - get user Access Token via Cronjob

is it possible to get an valid access token for an user via a cronjob? i want to create an app that parse every night all posts from the user and check if there are some special chars.

用户可以进入象征性的i,也可以进入私人员额。

但用户对口号的存取将告终。

能否用“跳板”重新启用用户? 也就是说,“快乐”可能必须更新100个用户使用口号,而“独家”则有用户开放授权方言,因为它通过“快乐”要求一个服务器。

我正在使用Sphp进行面对面的复印件。

最佳回答

无,甚至可以说,官方网站员额:

The user must access your application before you re able to get a valid "authorization code" to be able to make the server-side OAuth call again. Apps will not be able to setup a background/cron job that tries to automatically extend the expiration time, because the "authorization code" is short-lived and will have expired.

顺便说一句,当你从Server-Side accreditation 流量中获取信息时,如果你坚持下去,被证明人就应当持续一个月,然后可以在这个月使用。

在该月之后,如果用户仓促重新投入你的用具,那么就将停止使用,而且你不得不转接该用户。

问题回答

If you use the facebook jdk you can use: $token = $facebook->getAccessToken(); then, save $token into database for use by cronjob

    $args = array(
                  access_token   => $page_info[ access_token ], //Offline Access Token From Database
                  message        => $_POST[ description ],
                  link           =>$_POST[ link ],
                  picture        =>$_POST[ image ],
                  name           =>$_POST[ title ]
                 );
    $post_id = $facebook->api("/$page_id/feed","post",$args);

网页:id id

$post_id = $facebook->api("/me/feed","post",$args);




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签