OPiQuotations  v.03.00.00 — April 5, 2019
Namespaces | Variables
une-OPiCitation-pour-Facebook.php File Reference

Little PHP application to send one quotation (from OPiCitations) to Facebook account https://www.facebook.com/1OPiCitationParJour. More...

Go to the source code of this file.

Namespaces

 OPiCitations
 

Variables

if(true) else
 
 $LABEL = 'Facebook - 1OPiCitationParJour'
 
 $opiquotations = new OPiQuotations\OPiQuotations()
 
 $quot = $opiquotations->quotation_by_random($LABEL)
 
if($quot===null) $text
 
 if (true)
 
 $ch = curl_init('https://graph.facebook.com/'.$page_id.'/feed')
 
if(! $ch) $r
 
if($ch===false) $result = curl_exec($ch)
 
 $msg_id = array_pop($msg_id)
 
 $url = 'https://www.facebook.com/1OPiCitationParJour/posts/'.$msg_id
 
if(true) $selection = new OPiQuotations\Selection($LABEL, NULL, $url)
 
 $ok = $opiquotations->quotation_add_selection($quot, $selection)
 

Detailed Description

Little PHP application to send one quotation (from OPiCitations) to Facebook account https://www.facebook.com/1OPiCitationParJour.

(September 13, 2017)

Piece of OPiQuotations. https://bitbucket.org/OPiMedia/opiquotations

GPLv3 — Copyright (C) 2014, 2016, 2017 Olivier Pirson http://www.opimedia.be/

Definition in file une-OPiCitation-pour-Facebook.php.

Variable Documentation

◆ $ch

$ch = curl_init('https://graph.facebook.com/'.$page_id.'/feed')

Definition at line 95 of file une-OPiCitation-pour-Facebook.php.

◆ $LABEL

$LABEL = 'Facebook - 1OPiCitationParJour'

Definition at line 61 of file une-OPiCitation-pour-Facebook.php.

◆ $msg_id

$msg_id = array_pop($msg_id)

Definition at line 138 of file une-OPiCitation-pour-Facebook.php.

◆ $ok

$ok = $opiquotations->quotation_add_selection($quot, $selection)

Definition at line 152 of file une-OPiCitation-pour-Facebook.php.

◆ $opiquotations

$opiquotations = new OPiQuotations\OPiQuotations()

Definition at line 64 of file une-OPiCitation-pour-Facebook.php.

◆ $quot

$quot = $opiquotations->quotation_by_random($LABEL)

Definition at line 66 of file une-OPiCitation-pour-Facebook.php.

◆ $r

if (! $ch) $r
Initial value:
= curl_setopt_array($ch,
array(CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => array('access_token' => $access_token,
'message' => $text),
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_SSL_VERIFYPEER => false))
if($quot===null) $text

Definition at line 102 of file une-OPiCitation-pour-Facebook.php.

◆ $result

$result = curl_exec($ch)

◆ $selection

if (true) $selection = new OPiQuotations\Selection($LABEL, NULL, $url)

◆ $text

if ( $quot===null) $text

◆ $url

$url = 'https://www.facebook.com/1OPiCitationParJour/posts/'.$msg_id

Definition at line 140 of file une-OPiCitation-pour-Facebook.php.

◆ else

if (( $result===null)||isset( $result[ 'error'])) if (empty( $result[ 'id'])) else
Initial value:
{
#DEBUG_END
ini_set('display_errors', 'stderr')

Definition at line 35 of file une-OPiCitation-pour-Facebook.php.

◆ if

if(true)

Definition at line 84 of file une-OPiCitation-pour-Facebook.php.