Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/02/2011, 10:53
Avatar de RIVERMILLOS
RIVERMILLOS
 
Fecha de Ingreso: marzo-2010
Mensajes: 1.336
Antigüedad: 14 años, 2 meses
Puntos: 15
Respuesta: ayuda con file_get_contents()

hola muchas gracias por la respues me podrias explicar un poco mas lo que estoy trantando de hacer es correr este ejmplo de facebook.,

Código PHP:
Ver original
  1. <?php
  2.  
  3.   $app_id = "xxxxx";
  4.   $app_secret = 'xxx';
  5.  
  6.   $token_url = "https://graph.facebook.com/oauth/access_token?".
  7.     "client_id=" . $app_id .
  8.     "&client_secret=" . $app_secret .
  9.     "&grant_type=client_credentials";
  10.  
  11.   $app_access_token = file_get_contents($token_url);
  12.  
  13.   $user_id = THE_CURRENT_USER_ID;
  14.  
  15.   $apprequest_url ="https://graph.facebook.com/" .
  16.     $user_id .
  17.     "/apprequests?message='INSERT_UT8_STRING_MSG'" .
  18.     "&data='INSERT_STRING_DATA'&"  .
  19.     $app_access_token . "&method=post";
  20.  
  21.   $result = file_get_contents($apprequest_url);
  22.  
  23.   echo $result;
  24. ?>

saludos