manually create facebook cookie using curl

Fermé Publié le Oct 7, 2010 Paiement à la livraison
Fermé Paiement à la livraison

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

Marketing sur Facebook JavaScript PHP Architecture Logicielle

Nº du projet : #816461

À propos du projet

3 propositions Projet à distance Actif Nov 8, 2010

3 freelances font une offre moyenne de 367 $ pour ce travail

srinichal

I can deliver the code after a short discussion

$500 USD en 5 jours
(97 Commentaires)
7.0
xfinder

Hi, Pls Check PMB.

$1200 USD en 12 jours
(18 Commentaires)
5.6
benmcollins13

Please read PM

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(4 Commentaires)
3.4