Nasıl bir facebook sayfasındaki duvara yayınlarım (profiline değil)

oy
86

Ben php yazılı bir blog sitesi var ve php curl kullanarak geçti basit http sonrası istekleri kullanarak başlık altında otomatik olarak yeni twitter blog yayınlarını ve bir blog ping nakleder.

Ben blog sitesi için bir facebook sayfası ve güncellemeleri sayfasındaki duvara asılacak istiyorum Bunu yapmak için basit bir yol var?

Ne istiyorum gerçekten bir http sonrası isteği olarak paket yapmak için bir URL ve params kümesidir.

Bu yeni bir stil sayfasına bir profil üzerinde duvara yazılan olduğuna dikkat edin.

Şimdiden teşekkürler.

Oluştur 27/03/2009 saat 21:59
kaynak kullanıcı
Diğer dillerde...                            


6 cevaplar

oy
5

Otomatik olarak bir uygulama oluşturma ve Frank belirttiği gibi şablonu besleme yayıncı kullanmadan Facebook duvarlara yazılan olamaz.

Yapabileceğiniz tek şey kullanıcı etkileşimi gerektiren sağladıkları payı 'widget'lar, kullanmaktır.

Cevap 09/04/2009 saat 20:19
kaynak kullanıcı

oy
3

Blogunuza bir RSS beslemesi çıkışı Eğer Facebook'un "kullanabilirsiniz RSS Graffiti Facebook duvarınıza O besleme göndermek için" uygulamasını. Diğer RSS Facebook uygulamaları yanı vardır; Sadece "RSS uygulamalar için Facebook" arama ...

Cevap 22/10/2009 saat 18:58
kaynak kullanıcı

oy
65

PHP SDK alın github ve aşağıdaki kodu çalıştırın:

<?php
$attachment = array(
    'message' => 'this is my message',
    'name' => 'This is my demo Facebook application!',
    'caption' => "Caption of the Post",
    'link' => 'http://mylink.com',
    'description' => 'this is a description',
    'picture' => 'http://mysite.com/pic.gif',
    'actions' => array(
        array(
            'name' => 'Get Search',
            'link' => 'http://www.google.com'
        )
    )
);

$result = $facebook->api('/me/feed/', 'post', $attachment);

Yukarıdaki kod duvarınıza üzerine bir mesaj yolla ... ve arkadaşlarınızın veya başkalarının duvara göndermek istiyorsanız o zaman yerini alacak medaha fazla bilgi user..for API Belgelerinin dışarı bakmak olduğunu Facebook Kullanıcı kimliğine sahip.

Cevap 07/08/2010 saat 09:26
kaynak kullanıcı

oy
8

Harish burada cevabı var - sen istemek gerekir dışında manage_pageskimlik doğrulama ve daha sonra kullanırken izni page-idyerine meyayınlarken ....

$result = $facebook->api('page-id/feed/','post',$attachment);
Cevap 16/05/2011 saat 10:26
kaynak kullanıcı

oy
9

Bu benim için çalışıyor:

try {
       $statusUpdate = $facebook->api('/me/feed', 'post',
                 array('name'=>'My APP on Facebook','message'=> 'I am here working',
                 'privacy'=> array('value'=>'CUSTOM','friends'=>'SELF'),
                 'description'=>'testing my description',
                 'picture'=>'https://fbcdn-photos-a.akamaihd.net/mypicture.gif',
                 'caption'=>'apps.facebook.com/myapp','link'=>'http://apps.facebook.com/myapp'));
 } catch (FacebookApiException $e) {
      d($e);
}
Cevap 05/06/2011 saat 13:56
kaynak kullanıcı

oy
0

Sen isteğe bağlı parametreleri, HTTP yöntemi seçme ve ayarlayarak API arama yapabilirsiniz:

$facebook->api('/me/feed/', 'post', array(
    'message' => 'I want to display this message on my wall'
));

Facebook Wall'a Yayınla Gönder:

fbConfig.php Facebook API bağlayıp erişim jetonu almak üzere dosya dahil et.

Mesaj mesajı ad, bağlantı, açıklama ve resim Facebook duvarına sunulacaktır. Mesaj gönderme durumu gösterilecektir.

FB erişim belirteci ($ accessToken) mevcut değilse, Facebook Giriş URL'si oluşturulacak ve kullanıcı FB giriş sayfasına yönlendirildi.

facebook duvar php sdk için yayınla

<?php
//Include FB config file
require_once 'fbConfig.php';

if(isset($accessToken)){
    if(isset($_SESSION['facebook_access_token'])){
        $fb->setDefaultAccessToken($_SESSION['facebook_access_token']);
    }else{
        // Put short-lived access token in session
        $_SESSION['facebook_access_token'] = (string) $accessToken;

        // OAuth 2.0 client handler helps to manage access tokens
        $oAuth2Client = $fb->getOAuth2Client();

        // Exchanges a short-lived access token for a long-lived one
        $longLivedAccessToken = $oAuth2Client->getLongLivedAccessToken($_SESSION['facebook_access_token']);
        $_SESSION['facebook_access_token'] = (string) $longLivedAccessToken;

        // Set default access token to be used in script
        $fb->setDefaultAccessToken($_SESSION['facebook_access_token']);
    }

    //FB post content
    $message = 'Test message from CodexWorld.com website';
    $title = 'Post From Website';
    $link = 'http://www.codexworld.com/';
    $description = 'CodexWorld is a programming blog.';
    $picture = 'http://www.codexworld.com/wp-content/uploads/2015/12/www-codexworld-com-programming-blog.png';

    $attachment = array(
        'message' => $message,
        'name' => $title,
        'link' => $link,
        'description' => $description,
        'picture'=>$picture,
    );

    try{
        //Post to Facebook
        $fb->post('/me/feed', $attachment, $accessToken);

        //Display post submission status
        echo 'The post was submitted successfully to Facebook timeline.';
    }catch(FacebookResponseException $e){
        echo 'Graph returned an error: ' . $e->getMessage();
        exit;
    }catch(FacebookSDKException $e){
        echo 'Facebook SDK returned an error: ' . $e->getMessage();
        exit;
    }
}else{
    //Get FB login URL
    $fbLoginURL = $helper->getLoginUrl($redirectURL, $fbPermissions);

    //Redirect to FB login
    header("Location:".$fbLoginURL);
}

YARALANILAN:

https://github.com/facebookarchive/facebook-php-sdk

https://developers.facebook.com/docs/pages/publishing/

https://developers.facebook.com/docs/php/gettingstarted

http://www.pontikis.net/blog/auto_post_on_facebook_with_php

https://www.codexworld.com/post-to-facebook-wall-from-website-php-sdk/

Cevap 08/10/2017 saat 04:41
kaynak kullanıcı

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more