manually create facebook cookie using curl

Imefungwa Ilichapishwa Oct 7, 2010 Kulipwa wakati wa kujifungua
Imefungwa Kulipwa wakati wa kujifungua

Hi there,

I have created a facebook connect app. Problem is, the session data is placed in the URL. For security reasons, I cant have this happen.

instead, i need to create a web proxy where I take the users user name and password via a form, and then, when they press submit, use curl to log them into facebook, and write the session information to a cookie that facebook understands.

Then, after successful login, my app will redirect them to my canvas url.

What I need to do is ensure, that facebook will read the cookies I just stored, and keep the user logged in.

Please let me know if you can do this -

For reference, here are a few urls to get you started:

1) The following URL may help with writing cookies, but I am not sure [url removed, login to view]

2) Reading cookies:

define('FACEBOOK_APP_ID', 'your application id');

define('FACEBOOK_SECRET', 'your application secret');

function get_facebook_cookie($app_id, $application_secret) {

$args = array();

parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args);

ksort($args);

$payload = '';

foreach ($args as $key => $value) {

if ($key != 'sig') {

$payload .= $key . '=' . $value;

}

}

if (md5($payload . $application_secret) != $args['sig']) {

return null;

}

return $args;

}

$cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET);

Code must be written in PHP

Utangazaji wa Facebook JavaScript PHP Software Architecture

Kitambulisho cha Mradi: #816461

Kuhusu mradi

3 mapendekezo Mradi wa mbali Ipo mtandaoni %project.latestActivity_relativeTime|badilisha%

3 wafanyakazi huru wanazabuni wastani wa $367 kwa kazi hii

srinichal

I can deliver the code after a short discussion

$500 USD kwa siku 5
(Maoni 97)
7.0
xfinder

Hi, Pls Check PMB.

$1200 USD kwa siku 12
(Maoni 18)
5.6
benmcollins13

Please read PM

$250 USD kwa siku 1
(Maoni 4)
3.4