PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Edvaldo Szymonek   PHP Facebook Post to Wall, Pages or Groups   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Sample
Class: PHP Facebook Post to Wall, Pages or Groups
Send posts to Facebook user profile, pages, groups
Author: By
Last change: Update of index.php
Date: 8 months ago
Size: 336 bytes
 

Contents

Class file image Download
<?php

require_once "vendor/autoload.php";

use
FacebookApp\FacebookApp;

session_start();
$token = isset($_SESSION["token"]) ? $_SESSION["token"] : null;

$app = new FacebookApp(require "config/app.config.php");
if (!
$app->checkAccess($token)) {
    exit(
"<a href=\"{$app->getLoginUrl()}\">Fazer login com Facebook</a>");
}