Solved

How to upload at facebook news feed section

Posted on 2010-11-23
2
435 Views
Last Modified: 2013-11-13
Hello Sir

I want to upload any file at facebook news feed option.Means when i upload any file at server from my website that time it shall also upload at facebook news feed section.Then please guide to me how to do this.
Regards,
Aasim afridi
0
Comment
Question by:rAfridi
2 Comments
 
LVL 2

Accepted Solution

by:
karthi4all earned 500 total points
ID: 34203034
1.Use the facebook php sdk, from
https://github.com/facebook/php-sdk/

2.settup an application profile

http://www.facebook.com/developers/


3, here is the code to post to wall

 public function postToWall($id, $message, $picture, $link, $name, $description) {
        try {
           $fb=new Facebook();
            $result = $fb->api("/$id/feed", "POST", Array(
                        'message' => $message,
                        'picture' => $picture,
                        'link' => $link,
                        'name' => "your app name",
                        'description' => $description
                    ));
            return "ok";
        } catch (FacebookApiException $e) {
            return false;
        }
    }

note : go through the sample code in sdk to find how to setup app, you can google and find lot of tutorials for that..
0
 

Author Closing Comment

by:rAfridi
ID: 34523494
good answer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how can display objects ? 3 20
Form with Modals 16 42
how to use a function in heredoc 5 21
PHP get array item with custom id 4 21
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now