Solved

How to upload at facebook news feed section

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

760 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

21 Experts available now in Live!

Get 1:1 Help Now