Hello all, I own a couple of pages against Child abuse and now I'm developing a Facebook application for fighting against Child Abuse.
I'm somewhat a newbie, and I found many wonderful resources on the net, however, I don't seem to find what I really want.
I know to build a basic app that accesses a user's basic information(using fb_sig_user). However, I need the code to publish static content to my users' wall, request permissions for the same, (would be nice if it publishes each time they interact with my page).
It would also be nice if the app can post to the user's friends too..but its not a must.
Can someone help me? I have these files with me (its an FBML app,btw) and I'm stuck :
tab.php
<?php
if (isset($_REQUEST['name'])){
$uidc2 = $_REQUEST['fb_sig_user'];
echo $uidc2;
?>
<div id="update"></div>
<form action="" id="frm_test" method="post" onsubmit="return false;">
<input type="hidden" name="name" size="50" />
<input name="name" type="button" clickrewriteurl='http://somewebsite.com/fb/tab.php' clickrewriteform='frm_test' clickrewriteid='update' value="submit"/>
</form>
index.php
<?php
require 'facebook.php';
$app_id = 'xyzzy';
$application_secret = 'abc';
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $application_secret,
'cookie' => true, // enable optional cookie support
));
if ($facebook->getSession()) {
echo '<a href="' . $facebook->getLogoutUrl() . '">Logout</a>';
$user = $facebook->getUser();
} else {
echo '<a href="' . $facebook->getLoginUrl() . '">Login</a>';
}
?>
Any help a this point is really much appreciated. Thank you.