English 中文(简体)
借助转介对Faces的认证
原标题:Facebook canvas authentication by referral

现在,我一直在处理这个问题,我今天刚刚发言,我认识到我确实非常需要帮助,我无法找到处理类似问题的任何职位。

我正试图制作一张面像(自2012年1月以来——如果存在任何标准变化,你可以把它告诉我),而且我已经妥善安排了我的血管。

因此,在你访问我的面纱时,你可以看到我的照片。 然而,我对认证有问题。

我的口供需要基本信息,并需要用户的电子邮件地址。

So as far as I have gotten so far, I have set it so that new users can see the authentication dialog and then visit my app. On visiting my app I want my app to be able to access the information as I stated above. However on my canvas page I did the following for code in php, and nothing else, I want to be able to see what information is passed on to my app by the facebook referral from the authentication dialog:

    <?php 
    print_r($_GET);
    echo "
";
    print_r($_POST);
    ?>

然而,令人痛心的是,这给我留下了空洞的阵列,而没有其他东西。

我真正需要的是我的“Facebook”数据,而用户是谁,尽管我很相信,我可以通过访问图表获得目前的用户的帮助。

so thats my first problem, second problem is that when I logout of facebook and I visit apps.facebook.com/canvas-page I don t get asked to login, why is that so? Do I have to redirect to Facebook using JavaScript to login and then refer to my app?

Currently these are my settings (ask for more info so that i can give them to you) Settings > Auth Dialog > Authenticated referrals > User & Friend permission = email Settings > Auth Dialog > Authenticated referrals > Auth Token parameter = ?code=

1. 设置和设计; 高等和大专;移民 = 全部ENABLED

最佳回答

FB use Signed Request to send data to your app (not $_POST, not $_GET). There is a chapter called signed_request Parameter in Sample Canvas App that talk about it.

http://developers.facebook.com/docs/fer/php/“rel=“nofollow”php-sdk 。

$signed_request = $facebook->getSignedRequest();

var_dump($signed_request);

array (
   algorithm  =>  HMAC-SHA256 ,
   expires  => 1326632400,
   issued_at  => 1326628636,
   oauth_token  =>  *** ,
   page  => 
  array (
     id  =>  *** ,
     liked  => false,
     admin  => true,
  ),
   user  => 
  array (
     country  =>  cl ,
     locale  =>  en_US ,
     age  => 
    array (
       min  => 21,
    ),
  ),
   user_id  =>  *** ,
)

Besides you can pass a parameter called app_data through URL:

"http://www.facebook.com/YourPage?v=app_1234567890&app_data=any_string_here"

You will get it in the $signed_request too.

...
array (
   algorithm  =>  HMAC-SHA256 ,
   app_data  =>  any_string_here ,
   expires  => 1326636000,
   issued_at  => 1326629411,
...

请评论 感谢。 -

问题回答

暂无回答




相关问题
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 ...

热门标签