Quantcast
Channel: BTSoru.com - Bilisim ve Yazilim Teknolojileri Soru/Cevap Platformu - latest questions
Viewing all articles
Browse latest Browse all 4270

Facebook sayfasına PHP ile post edilenleri nasıl public yapabilirim?

$
0
0

Merhaba arkadaşlar, facebook sayfa duvarıma php ile post işlemi yapıyorum. Sayfa yöneticisi ben olduğum için gönderilen yazıları benden başkası göremiyor. Gönderim ayarlarında herkese açık olarak yaptım ama olmadı. Sorun nedir sizce?

function FBPost($title, $content,$caption)

{ $facebook = new Facebook(array( 'appId' => 'xxxxxxx', 'secret' => 'xxxxxxxxxxxxxxx', ));

// Get User ID
$user = $facebook->getUser();

if ($user) {
    try {
        $page_id = 'xxxxxxx';
        $page_info = $facebook->api("/$page_id?fields=access_token");
        if (!empty($page_info['access_token'])) {
            $args = array('access_token' => $page_info['access_token'],
            'message' => $caption,
        'name' => $title,
        'caption' => 'Economic Calendar '.$title.' description',
        'link' => 'http://forexalert.org/index.php?next=economic_calendar',
        'description' => $content,
        'picture' => 'http://forexalert.org/img/alert_logo.png',
        'actions' => array(
                            array(
                                'name' => 'Forex Alert',
                                'link' => 'http://forexalert.org/index.php?next=economic_calendar'
                            )
                        )
    );
            $post_id = $facebook->api("/$page_id/feed", "post", $args);
        } else {
            $permissions = $facebook->api("/me/permissions");
            if (!array_key_exists('publish_stream', $permissions['data'][0]) || !
                array_key_exists('manage_pages', $permissions['data'][0])) {
                // We don't have one of the permissions
                // Alert the admin or ask for the permission!
                header("Location: " . $facebook->getLoginUrl(array("scope" =>
                        "publish_stream, manage_pages")));
            }

        }
    }
    catch (FacebookApiException $e) {
        error_log($e);
        $user = null;
    }
}

// Login or logout url will be needed depending on current user state.
if ($user) {
    $logoutUrl = $facebook->getLogoutUrl();
} else {
    $loginUrl = $facebook->getLoginUrl(array('scope' =>
            'manage_pages,publish_stream'));
}

}


Viewing all articles
Browse latest Browse all 4270

Trending Articles


BBasTTuuHHaaNN


Korunma zirhi


Sübhanallahi milel mizan


gaipten altın ve para getirmek için


9999 Adet innâ fetahnâ leke fethan mubinâ


Cin çağırma


İrsali hatif


Ya Cebbar;Yâ Cebbar c.c:Dilediğini zorla yaptırmaya


Karia Suresi ile Celb


Ve huvel kaviyyul azîz


Havasta Açık Kapalı Günler


Taslit ve Darp


Musallat için


Cinleri Kovma Babı


Muhabbet Ve Cimaya Kuvvet


Hizbul Vikâye (Koruyucu Dua) Ruhsal Yükselme ve Korunmak


SCCM 2012 Client Installation issue


Karanfil ve Surei İhlas ile CELB


Şura Suresi 19. Ayet Mucizesi


Sıkıntıyı gideren Ismi Celil duası