Beispiel #1
0
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 ******************************************************************************/
// Include the ringside client libraries
require_once 'config.php';
// Get the ringside client
$ringsideClient = new RingsideApiClients(Config::$api_key, Config::$secret);
$ringsideClient->require_frame();
// Make sure the user is logged in and get the UID
$userid = $ringsideClient->require_login();
// Instantiate the rest client, this is for the ratings api in extension apps
$rest = new RingsideRestClient($ringsideClient->api_client);
$name = $rest->delegate->users_getInfo($userid, "first_name");
// Show the dashboard
?>
<fb:dashboard>
	<fb:action href="index.php?action=list">View Suggestions</fb:action>
	<fb:create-button href="index.php?action=add">Create a Suggestion</fb:create-button>
</fb:dashboard>
<?php 
// Say hi to the user, but let's use an fbml tag, just as another example of using fbml
// instead of html
echo '<fb:explanation><fb:message>Suggestions Demo Application</fb:message>Welcome ' . $name[0]['first_name'] . '</fb:explanation>';