本文整理汇总了PHP中Facebook::setFileUploadSupport方法的典型用法代码示例。如果您正苦于以下问题:PHP Facebook::setFileUploadSupport方法的具体用法?PHP Facebook::setFileUploadSupport怎么用?PHP Facebook::setFileUploadSupport使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facebook
的用法示例。
在下文中一共展示了Facebook::setFileUploadSupport方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetFileUploadSupport
public function testSetFileUploadSupport()
{
$facebook = new Facebook(array('appId' => self::APP_ID, 'secret' => self::SECRET));
$this->assertFalse($facebook->useFileUploadSupport(), 'Expect file upload support to be off.');
$facebook->setFileUploadSupport(true);
$this->assertTrue($facebook->useFileUploadSupport(), 'Expect file upload support to be on.');
}
示例2: dirname
<?php
session_start();
ini_set(max_execution_time, 0);
$dir_path = dirname(__FILE__) . '/';
$class_path = $dir_path . 'Controller/classes/';
$module_path = $dir_path . 'Modules/';
$view_path = $dir_path . 'Views/';
include $dir_path . 'includes/config.php';
$databaseobject = new DBclass();
require 'create/facebook.php';
$facebook = new Facebook(array('appId' => '560397463992284', 'secret' => 'e8fcc4a2b8b37fbddd6e6b3e2f207e5f', 'fileUpload' => true, 'cookie' => true));
$session = $facebook->getSession();
$me = null;
// Session based API call.
print_r($session);
$facebook->setFileUploadSupport(true);
$user = $facebook->getUser();
print_r($user);
$albums = $facebook->api('/me/albums', 'get', array('access_token' => $access_token));
/*foreach ($albums[data] as $album)
{
if ($album['name'] == $image_data['album_name'])
{
echo $album_id = $album['id'];
}<?php */
//}