Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: a9ce141c4f
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (27 sloc) 1.043 kb
<?php
/*
* multiFeedHandler.php - Posting to other's feed form handler
*
*/
include_once '../constants.php';
include_once LIB_PATH.'moods.php';
include_once LIB_PATH.'display.php';
include_once LIB_PATH.'feed.php';
$picked = $_POST['picked'];
$fb = get_fb();
$moods = get_other_moods();
$canvas_url = $fb->get_facebook_url('apps') . '/' . APP_SUFFIX;
if ($picked != -1) {
$feed = array('template_id' => FEED_STORY_2,
'template_data' => array('emote' => $moods[$picked][1],
'emoteaction' => $moods[$picked][0]));
$data = array('method'=> 'multiFeedStory',
'content' => array( 'feed' => $feed,
'next' => $canvas_url
));
} else {
$data = array('errorCode'=> FACEBOOK_API_VALIDATION_ERROR,
'errorTitle'=> '<fb:intl>No mood selected</fb:intl>',
'errorMessage'=>'<fb:intl>Please select a smiley.</fb:intl>');
}
echo json_encode($data);
Jump to Line
Something went wrong with that request. Please try again.