Can anyone help. I am using the $pushfacebook function within my code to allow users to push detail to thir wall. It works fine under the following condition:-
User 1 is logged into Facebook
User 1 is logged into Kumbooka
However, if User 2 is logged into Facebook, and User 1 is logged into Kumbooka, the details pushed from Kumbooka by User 1 appear on User 2's Facebook wall. Further to this, it appears as if User 2 posted it, rather than User 1 who did the actual post from Kumbooka.
My guess is that we are finding out the user that is logged into Facebook, rather than the user that is logged into Kumbooka, and then doing the push.
How can I resolve this issue?
The actual code I am using is the following
$pushfacebook = JRequest::getInt('pushfacebook',0);
if ($pushfacebook) {
require_once JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php';
ob_start();
$jfbuser = JRequest::getInt('user_id', 0);
$title = JText::sprintf(" %s %s", $itemstatus, $stuff->jr_title);
$jfbname = JText::sprintf(" %s", $stuff->jr_title);
$jfbcaption = "socialise your stuff at Kumbooka.com";
$jfburl = "
www.kumbooka.com/index.php?option=com_kb...=contentdetail&asin=". $stuff->jr_asin;
$jfbimages = $stuff->jr_mediumimage;
$jfbvideo = "
www.youtube.com/v/". $stuff->jr_youtube;
$jfbactions = "{'name':'View my full collection','link': '
www.kumbooka.com/index.php?option=com_co...d=$jfbuser&Itemid=93'}";
if(isset($stuff->jr_youtube))
$vals = array("message"=>$title, "picture"=>$jfbimages, "link"=>$jfburl, "name"=>$jfbname, "caption"=>$jfbcaption, "source"=>$jfbvideo, "actions"=>$jfbactions);
else
$vals = array("message"=>$title, "picture"=>$jfbimages, "link"=>$jfburl, "name"=>$jfbname, "caption"=>$jfbcaption, "actions"=>$jfbactions);
$fbLibrary = JFBConnectFacebookLibrary::getInstance();
$fbLibrary->setFacebookMessage( $vals );
//echo 'alert("Hi");';
$html = ob_get_contents();
ob_end_clean();
$result->facebook = $html;
} else {
$result->facebook = '';
}
} else {
$result->result = $this->_db->getError();
$result->status = "Error";
}
//var_dump($table);
return $result;
}
Thanks for any advice anyone can offer.
Kind regards
Gary