Solved

How to upload at facebook news feed section

Posted on 2010-11-23
2
445 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

726 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