<?php
$url="http://google.com";
$title="Test Content";
$message = "$title $url";
$fb_access_token = "----";  // FB access token
$fb_user_id ="---";   //Facebook user id
$post_arg = array("access_token" => $fb_access_token, "message" => $message, "id" => $fb_user_id, "method" => "post");
fb_curl_function("https://graph.facebook.com/feed", "POST", $post_arg);
function fb_curl_function($req_url = "", $type = "", $arguments =  array()){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $req_url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
if($type == "POST"){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $arguments);
}
$result = curl_exec($ch);
curl_close ($ch);
return $result;
}
?>
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Showing posts with label Facebook autopost. Show all posts
Showing posts with label Facebook autopost. Show all posts
Monday, 7 April 2014
Facebook Auto Post functionality
Subscribe to:
Comments (Atom)
Feet/Inches to Meters Converter & Lbs to Kgs Converter
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
- 
<?php $to = "somebody@example.com, somebodyelse@example.com"; $subject = "HTML email"; $message = " <h...
 - 
document.onkeydown = myKeyDownHandler; function myKeyDownHandler(event){ alert(event.keyCode) }
 - 
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...