Search Results

Search found 6357 results on 255 pages for 'facebook graph'.

Page 2/255 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Using Perl WWW::Facebook::API to Publish To Facebook Newsfeed

    - by Russell C.
    We use Facebook Connect on our site in conjunction with the WWW::Facebook::API CPAN module to publish to our users newsfeed when requested by the user. So far we've been able to successfully update the user's status using the following code: use WWW::Facebook::API; my $facebook = WWW::Facebook::API->new( desktop => 0, api_key => $fb_api_key, secret => $fb_secret, session_key => $query->cookie($fb_api_key.'_session_key'), session_expires => $query->cookie($fb_api_key.'_expires'), session_uid => $query->cookie($fb_api_key.'_user') ); my $response = $facebook->stream->publish( message => qq|Test status message|, ); However, when we try to update the code above so we can publish newsfeed stories that include attachments and action links as specified in the Facebook API documentation for Stream.Publish, we have tried about 100 different ways without any success. According to the CPAN documentation all we should have to do is update our code to something like the following and pass the attachments & action links appropriately which doesn't seem to work: my $response = $facebook->stream->publish( message => qq|Test status message|, attachment => $json, action_links => [@links], ); For example, we are passing the above arguments as follows: $json = qq|{ 'name': 'i\'m bursting with joy', 'href': ' http://bit.ly/187gO1', 'caption': '{*actor*} rated the lolcat 5 stars', 'description': 'a funny looking cat', 'properties': { 'category': { 'text': 'humor', 'href': 'http://bit.ly/KYbaN'}, 'ratings': '5 stars' }, 'media': [{ 'type': 'image', 'src': 'http://icanhascheezburger.files.wordpress.com/2009/03/funny-pictures-your-cat-is-bursting-with-joy1.jpg', 'href': 'http://bit.ly/187gO1'}] }|; @links = ["{'text':'Link 1', 'href':'http://www.link1.com'}","{'text':'Link 2', 'href':'http://www.link2.com'}"]; The above, nor any of the other representations we tried seem to work. I'm hoping some other perl developer out there has this working and can explain how to create the attachment and action_links variables appropriately in Perl for posting to the Facebook news feed through WWW::Facebook::API. Thanks in advance for your help!

    Read the article

  • Facebook Connect OR Facebook Authorization using OAuth 2.0

    - by AJS
    I want to allow users to sign in using facebook as well to my website, since the recent release of new Facebook stuff, I am unsure which one to use. Previously, Facebook Connect was used. Now we have Facebook authorization feature, using the OAuth 2.0. Please tell me which one to use? and Is Facebook Connect going to be obsolete? I am new to Facebook Development.

    Read the article

  • Add a wall post to a page or application wall as page or application with facebook graph API

    - by blauesocke
    Hi, I wan't to create a new wall post on a appliaction page or a "normal" page with the facebook graph API. Is there a way to "post as page"? With the old REST-API it worked like this: $facebook->api_client->stream_publish($message, NULL, $links, $targetPageId, $asPageId); So, if I passed equal IDs for $targetPageId and $asPageId I was able to post a "real" wall post not caused by my own facebook account. Thanks!

    Read the article

  • Getting FBML Error unknown tag "fb:like" error with Facebook app

    - by overture8
    I've been looking at this for ages now and I cant find anything on the net that provides a solution. When trying to use the tag... ...this is embedded on a tab canvas. The 'Like' button appears when using the app locally, however, it doesn't appear when used on the facebook site. I get this error:- FBML Error (line 264): unknown tag "fb:like" I have FBML enabled in the settings. I've also tried using the iframe alternative with no luck. Any ideas? PS.. I'm using CakePHP

    Read the article

  • Facebook Canvas Apps, New API

    - by James
    I'm having some trouble with switching to the new JS API for a number of things with creating applications within FB, specifically the "Tab". <!-- function do_perm() { Facebook.showPermissionDialog('publish_stream,email,offline_access', null); } //--> This no longer works for me when called via an onclick command. Also, with the new API and an FBML app. How does this exactly work? The documentation is really poor so I am confused when looking at the old wiki, and the new developer site. Apologies for being pretty vague, but I'm just generally confused with the lack of clear direction with the new API and help would be greatly appreciated. I'm simply just trying to create a call that prompts for the new style user permission dialog, and oncomplete calls another JS function.

    Read the article

  • Facebook PHP SDK and Wordpress Error

    - by Gecko
    I have a developer environment setup with WAMP, Wordpress, and PHPEdit IDE. I use the Facebook, Twitter, and YouTube API's in a sidebar. I'm using Facebook's PHP SDK to display information(no login or admin functions). Since the FB SDK and WP use session_start() I get the following warning: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\dfi\wp-content\themes\DFI\header.php:12) in C:\wamp\www\dfi\wp-content\themes\DFI\api\facebook.php on line 36 I'm trying to figure this out by using the warning output but it doesn't help considering the following. I know about clearing white space and characters before and after <?php ?> and placing session_start() before any http output. I use unix line enders and UTF8 encoding without BOM. My host server is not set up for output_buffering. header.php line 11 to 13 11 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 12 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes();?>> 13 <head> It looks like the warning comes from inline php code. I don't know what I can do to fix this line. facebook.php line 34 to 37 34 public function __construct($config) { 35 if (!session_id()) { 36 session_start(); 37 } I don't think I can stop either FB or WP from calling session_start() without breaking everything. How do I make Wordpress and Facebook play nicely together without this error?

    Read the article

  • Example to get Facebook Events using sdk v4 from fan page into Wordpress site [on hold]

    - by Dorshin
    Been trying to update to the new FB php sdk v4 for pulling events into my website, but having trouble finding how to do it. I want to pull public event information from a FB "page" using their fan page ID number. For example, a venue that has multiple events. What are the minimal classes I need to "require_once" and "use" to only pull the events (don't need to login)? The site is on Wordpress which doesn't use sessions, so what do I do with the "session_start()" statement? Will it work anyway? Could I get a basic code example of how to get the event info into an array? (I want to make sure I get the syntax correct) So far I've got the below code, but it is not working. session_start(); require_once( 'Facebook/GraphObject.php' ); require_once( 'Facebook/GraphSessionInfo.php' ); require_once( 'Facebook/FacebookSession.php' ); require_once( 'Facebook/FacebookCurl.php' ); require_once( 'Facebook/FacebookHttpable.php' ); require_once( 'Facebook/FacebookCurlHttpClient.php' ); require_once( 'Facebook/FacebookResponse.php' ); require_once( 'Facebook/FacebookSDKException.php' ); require_once( 'Facebook/FacebookRequestException.php' ); require_once( 'Facebook/FacebookAuthorizationException.php' ); require_once( 'Facebook/FacebookRequest.php' ); require_once( 'Facebook/FacebookRedirectLoginHelper.php' ); use Facebook\GraphSessionInfo; use Facebook\FacebookSession; use Facebook\FacebookCurl; use Facebook\FacebookHttpable; use Facebook\FacebookCurlHttpClient; use Facebook\FacebookResponse; use Facebook\FacebookAuthorizationException; use Facebook\FacebookRequestException; use Facebook\FacebookRequest; use Facebook\FacebookSDKException; use Facebook\FacebookRedirectLoginHelper; use Facebook\GraphObject; function facebook_event_function() { FacebookSession::setDefaultApplication('11111111111','00000000000000000'); /* make the API call */ $request = new FacebookRequest($session, '/{123456789}/events','GET'); $response = $request->execute(); $graphObject = $response->getGraphObject(); } So far, not getting anything in the $graphObject and it's throwing this error as well: PHP Fatal error: Uncaught exception 'Facebook\FacebookAuthorizationException' with message '(#803) Some of the aliases you requested do not exist: v2.0GET' in ../Facebook/FacebookRequestException.php:134 After I get something in the $graphObject, I want to add the info to a DB table. This part I am OK on. Thank you for the help.

    Read the article

  • Embedding Facebook Connect In A Facebook Page

    - by Russell C.
    Our site allows users to register using Facebook Connect. We also have a Facebook page. We'd like to include the "Connect with Facebook" button in our page so a user could instantly connect (aka register) and then be forwarded on to their account on our site. I was hoping to use the Static FBML page application and the FBML iFrame tag to simply embed the button but it looks like the iFrame tag isn't allowed in Facebook pages. Facebook Connect uses JavaScript so I'm wondering if there is some kind of trick I could use like popping up a page in a new window that would automatically display the connect dialog box. Any ideas on how I would include a Facebook Connect button on our Facebook page would awesome! Thanks in advance for your help.

    Read the article

  • Facebook App Wall Posting no longer showing in Facebook iPhone App

    - by David Hsu
    I use the GRAPH API with django for Facebook wall postings. Since yesterday, the wall posts only show on the Facebook web app but not the Facebook iPhone app. I tried Yelp, and their postings still show up. How can I debug this? Anyone notice this issue with their Facebook connect? Is this a Facebook algorithm issue. Code for Wall Post: graph = facebook.GraphAPI(access_token) attachment = {"name": name, "link": link, #"caption": "{*actor*} posted a new review", "description": desc, "picture": picture } graph.put_wall_post("",attachment)

    Read the article

  • Facebook insights for websites does not match on-site Facebook button counts

    - by Will
    I use Facebook Insights for websites and Facebook buttons on my site. However, the data reported by the two do not match. It always seems to be the case that the count reported by the buttons is significantly higher than the count reported in Facebook Insights. For example, this page http://www.appmyworld.com/blog/top-5-iphone-and-ipad-apps-of-the-week-10412.html has a count of 52 for Facebook which is made up of 19 likes, 21 shares and 12 comments according to AddThis and confirmed by http://sharedcount.com However, going into Facebook Insights for my website and looking at that specific page it shows only 4 total actions which is made up of 1 like and 3 shares. At the very least I would expect it to show a total count of 40 made up of 19 likes and 21 shares (I'm not sure it would track the 12 comments). Any thoughts on why this may be happening? My concern is if our website is not getting credit for the Facebook activity?

    Read the article

  • Facebook Graph API authentication in canvas app and track session

    - by cdpnet
    Short question is: how can i use graph api oauth redirects mechanism to authenticate user and save retrieved access_token and also use javascript SDK when needed (the problem is javascript SDK will have different access_token when initialized). I have initially setup my facebook iframe canvas app, with single sign on. This works well with graph api, as I am able to use access_token saved by facebook's javascript when it detects sessionchange(user logged in). But, I want to rather not do single sign-on. But, use graph api redirect and force user to send to a permissions dialog. But, if he has already given permissions, I shouldn't redirect user. How to handle this? Another question: I have done graph api redirects for authentication and have retrieved access_token also. But then, what if I want to use javascript call FB.ui to do stream.Publish? I think it will use it's own access_token which is set during FB.init and detecting session. So, I am looking for some path here. How to use graph api for authentication and also use facebook's javascript SDK when needed. P.S. I'm using ASP .NET MVC 2. I have an authentication filter developed, which needs to detect the user's authentication state and redirect.(currently it does this to graph api authorize url)

    Read the article

  • facebook API error : Uncaught OAuthException: Error validating access token.

    - by iyad al aqel
    guys i'm getting this error Fatal error: Uncaught OAuthException: Error validating access token. thrown in /home/techtud1/public_html/library/facebook.php on line 543 i'm a newbie to facebook development but i'm using the exact steps of this tutorial http://www.joeyrivera.com/2010/facebook-graph-api-app-easy-w-php-sdk/ when i tried to get the information of the user i got it once , but when i tried to do it again i got this error . and whatever i'm doing , i'm getting this error as a result HELP PZ

    Read the article

  • Facebook Like button warning, but prevents sharing

    - by Steve
    I added a FB Like button to my Wordpress template, and when I click Like, I receive an error, which pops up and says: There was an error liking the page. If you are the page owner, please try running your page through the linter on the Facebook devsite (https://developers.facebook.com/tools/lint/) and fixing any errors. The Lint Checker (now) gives no Error or Warnings, after I removed a duplicate og:description tag. Why is it not working?

    Read the article

  • Facebook Graph and PHP API

    - by Wes
    I've been working at this for a few hours, but the poor documentation is of no help. All I want to do is grab the data that exists at https://graph.facebook.com/cocacola/ as an example, and I cant even do that. I'm using the latest php API from facebook. This is my code, which returns nothing: <?php require '../src/facebook.php'; // Create our Application instance. $facebook = new Facebook(array( 'appId' => '254752073152', 'secret' => '904270b68a2cc3d54485323652da4d14', 'cookie' => true, )); $coke = $facebook->api('/cocacola'); echo '<pre>'; print_r($coke); echo '</pre>'; Any idea?

    Read the article

  • Facebook Stories for Retailers

    - by David Dorf
    Getting people to "like" a brand is important because it opens the door to a possible B2C relationship. Once a person likes that brand, the brand can post to their newsfeed with promotions, announcements, and surveys. At least for me, I "hide" the noisy brands and just monitor the ones that keep posts under 4 times a week. I see lots of people, especially with fashion brands, comment on postings at which point the posting is seen by their network. A metric I've heard (but not verified) is that for every person that comments, ten of their friends see the original posting. That's a pretty cheap way to communicate to potential customers in a viral way. Over at mainstreet.com they compiled the a list of the top liked retailers on Facebook as of Feb 1, 2011. They are listed below: 19,414,892 Starbucks 11,302,939 Victoria's Secret 7,925,184 Zara 7,032,398 McDonald's 6,117,222 H&M 5,400,586 Taco Bell 4,665,760 Subway 4,494,849 Lacoste 4,185,570 Hollister 3,973,181 Forever 21 So I guess the public likes their fast-food and fashion. To take this to the next level, Facebook is now displaying Sponsored Stories, which I saw for the first time on my page this weekend. I found this picture at the Wall Blog that depicits Sponsored Stories very well. Over on the right-hand column of a person's page, where they see advertisements and such, Facebook will post stories involving their network of friends and their interaction with sponsored brands. Now their "likes" can suddenly become your ads. "Jessica and Philip like Starbucks. What are you waiting for?" This is another great way to take messages viral by accessing social graphs. As usual there will be a certain level of outcry from privacy advocates, but given the other more iniquitous issues, I believe this will fall by the wayside. Retailers should consider using Sponsored Stories to increase their Likes, and thus increase their voice in the social world.

    Read the article

  • Facebook graph api photo upload to a fan page album

    - by kielie
    Hi guys, I have gotten the photo upload function to work with this code, <?php include_once 'facebook-php-sdk/src/facebook.php'; include_once 'config.php';//this file contains the secret key and app id etc... $facebook = new Facebook(array( 'appId' => FACEBOOK_APP_ID, 'secret' => FACEBOOK_SECRET_KEY, 'cookie' => true, 'domain' => 'your callback url goes here' )); $session = $facebook->getSession(); if (!$session) { $url = $facebook->getLoginUrl(array( 'canvas' => 1, 'fbconnect' => 0, 'req_perms'=>'user_photos,publish_stream,offline_access'//here I am requesting the required permissions, it should work with publish_stream alone, but I added the others just to be safe )); echo 'You are not logged in, please <a href="' . $facebook->getLoginUrl() . '">Login</a> to access this application'; } else{ try { $uid = $facebook->getUser(); $me = $facebook->api('/me'); $token = $session['access_token'];//here I get the token from the $session array $album_id = 'the id of the album you wish to upload to eg: 1122'; //upload your photo $file= 'test.jpg'; $args = array( 'message' => 'Photo from application', ); $args[basename($file)] = '@' . realpath($file); $ch = curl_init(); $url = 'https://graph.facebook.com/'.$album_id.'/photos?access_token='.$token; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $args); $data = curl_exec($ch); //returns the id of the photo you just uploaded print_r(json_decode($data,true)); } catch(FacebookApiException $e){ echo "Error:" . print_r($e, true); } } ?> I hope this helps, a friend and I smashed our heads against a wall for quite some time to get this working! Anyways, here is my question, how can I upload a image to a fan page? I am struggling to get this working, when I upload the image all I get is the photo id but no photo in the album. So basically, when the user clicks the upload button on our application, I need it to upload the image they created to our fan page's album with them tagged on it. Anyone know how I can accomplish this?

    Read the article

  • Free (Or Cheap) Alternatives For An SSL Certificate For Facebook Apps

    - by mickburkejnr
    In October (from what I remember) Facebook will require HTTPS connections to pages and app's that are hosted away from Facebook. At the moment, it comes up with a popup saying "do you want to turn secure browsing off". I think (as far as I know) that once October comes people won't be able to access these pages any more. Now, I know you have to pay for good SSL certificates. However, for a lot of clients this is just going to be a Facebook page, and not mission critical to their businesses. With this in mind, they may not want to pay for an SSL certificate. I was wondering if there are any free SSL certificates that could do the job? Even if there are no free ones, are there any cheap alternatives? Also, if you do use a free certificate, will it still work in the same way as a paid for certificate?

    Read the article

  • facebook og:image not working [closed]

    - by zeinab
    When I try to post a comment (share link) on an article from my page which is actually a page I am using as an application in Facebook: https://apps.facebook.com/ids_newsletter/, Facebook chooses the feed thumbnail image of the post feed randomly from my page. I tried using below to put a custom image for the post but nothing affected the post thumbnail. So what should I do? <meta property="og:title" content="IDS June Newsletter" /> <meta property="og:description" content="Check this out" /> <meta property="og:image" content="MYSITEURL/Images/logobig.png" /> <meta property="og:image:type" content="image/png" /> <meta property="og:image:width" content="200" /> <meta property="og:image:height" content="200" />

    Read the article

  • Cannot get a session with Facebook app? (using its Graph API)

    - by Jian Lin
    I have really simple few lines of Facebook app, using the new Facebook API: <pre> <?php require 'facebook.php'; // Create our Application instance. $facebook = new Facebook(array( 'appId' => '117676584930569', 'secret' => '**********', // hidden here on the post... 'cookie' => true, )); var_dump($facebook); ?> but it is giving me the following output: http://apps.facebook.com/woolaladev/i2.php would give out object(Facebook)#1 (6) { ["appId:protected"]=> string(15) "117676584930569" ["apiSecret:protected"]=> string(32) "**********" <--- just hidden on this post ["session:protected"]=> NULL <--- Session is NULL for some reason ["sessionLoaded:protected"]=> bool(false) ["cookieSupport:protected"]=> bool(true) ["baseDomain:protected"]=> string(0) "" } Session is NULL for some reason, but I am logged in and can access my home and profile and run other apps on Facebook (to see that I am logged on). I am following the sample on: http://github.com/facebook/php-sdk/blob/master/examples/example.php http://github.com/facebook/php-sdk/blob/master/src/facebook.php (download using raw URL: wget http://github.com/facebook/php-sdk/raw/master/src/facebook.php ) Trying on both hosting companies at dreamhost.com and netfirms.com, and the results are the same.

    Read the article

  • In Facebook: How to get User's list_ of_friends_ ID when User is offline[not Sign In].

    - by Vaibhav Bhalke
    Hi All In Facebook: How to get User's list_ of_friends_ ID when User is offline[not Sign In]. We are Integrating facebook application in our website.Our website development in Java's GWT[Googlw Web Toolkit] FrameWork. We are refering "Gwittit" sample codeWe open facebook account for our website and want to show all users[friends] photo conected to Website's FACEBOOK account when FB A/C is offline [not sign in]. We have used apiclient.getFriendList() in that we get list of all user id [with photo]connected to Our website's fb a/c.But Problem is that we have to sign in first and we don't want that Is there any way to solve this problem?

    Read the article

  • Post on a logged in users facebook wall

    - by Matt Nathanson
    Hey all, I've created a widget that will essentially unlock a music track, providing you post to either your twitter account, or facebook wall. I've signed up through facebook connect and I am able to successfully post onto my own wall... but the functionality I'm looking for is to be able to take ones username and password and automatically log in to facebook, and send my desired message. Like I said, it posts on my wall successfully, it's just not using the username and password from the field to log in to their respective facebooks and post. <?php $facename = $_POST['facename']; $facepass = $_POST['facepass']; define('FB_APIKEY', 'my_api_key'); define('FB_SECRET', 'my_secret_phrase_'); define('FB_SESSION', 'my_session_id'); require_once('facebook.php'); echo "post on wall"; try { $facebook = new Facebook(FB_APIKEY, FB_SECRET); $facebook->api_client->session_key = FB_SESSION; $fetch = array('friends' => array('pattern' => '.*', 'query' => "select uid2 from friend where uid1={$facename}")); echo $facebook->api_client->admin_setAppProperties(array('preload_fql' => json_encode($fetch))); $message = 'I downloaded Automatic Loveletter\'s new single \'To Die For\' here!'; if( $facebook->api_client->stream_publish($message)) echo "Added on FB Wall"; } catch(Exception $e) { echo $e . "<br />"; } ?> Any help in the right direction is greatly appreciated! Thanks, Matt

    Read the article

  • Facebook connect PHP API - friends_get() returns empty array

    - by Soufiane Hassou
    Couple of hours ago I succeed to get friends_get() to return an array of friends, but, now I don't know if it is my fault or something is wrong in facebooks' end (API problems?). Anyway I used a code from their documentation: <?php require_once 'facebook-platform/php/facebook.php'; $appapikey = ''; //CHANGE THIS $appsecret = ''; //CHANGE THIS $facebook = new Facebook($appapikey, $appsecret); //$user_id = $facebook->require_login(); $fb_user=$facebook->get_loggedin_user(); //$fb_user = $facebook->user; $friends = $facebook->api_client->friends_get(); $friends = array_slice($friends, 0, 10); $i=0; foreach ($friends as $friend) { $personArray = $facebook->api_client->users_getInfo($friend,"name"); $person[$i]=$personArray[0]; $i++; } $i=0; foreach ($person as $f) { echo " ".$f['name']; //MORE DETAILS HERE IN STEP 2 echo "<br />"; $i++; } echo "<br />"; ?> The login is working great, but, I can't retrieve the list of friends and I test also with api_client->pages_isFan and it doesn't seem to work too (says not a fan while the user is).

    Read the article

  • How to get Facebook share behavior with Facebook Connect on iPhone

    - by Benoit
    With the standard share at http://www.facebook.com/sharer.php one only needs to specify a URL. Title and thumbnail are automatically pulled from the web page (perhaps with the help of meta tags). With Facebook Connect (I am using the iPhone SDK), I need to supply everything explicitly (URL, title, caption, description, images, etc.). Is there a way to emulate the "share" behavior with Facebook Connect, i.e. let Facebook pull the missing elements from the page being shared itself?

    Read the article

  • Facebook require_login not working

    - by kielie
    hi guys, I am having some trouble with my little facebook application, I keep getting this friggin error, "Fatal error: Call to undefined method Facebook::require_login()", now the funny bit is that my exact same code is working for other people, but not for me, here is the code. <?php require_once( "facebook-php-sdk/src/facebook.php" ); $api_key = "my_api_key"; $secret = "my_secret_key"; $facebook = new Facebook( $api_key, $secret ); $user_id = $facebook->require_login(); echo "Hello World"; echo "Current logged in as <fb:name uid=\"$user_id\" />"; ?> As you can see it is a simple hello USER application, but for some reason this REFUSES to work for me, so if anyone can help out that would be great, thanx in advance!

    Read the article

  • Authorizing a Facebook Fan Page for Status Updates

    - by thechrisvoth
    I'm able to update the status on my PROFILE wall using this code: require_once 'facebook-platform/php/facebook.php'; $facebook = new Facebook('APP API KEY','APP SECRET KEY'); $user_id = 'MY USER ID'; $facebook->api_client->users_setStatus('This is a new status'); ...after authorizing using this address: http://facebook.com/authorize.php?api_key=MYAPPAPIKEY&v=1.0&ext_perm=publish_stream This code, however, does not work to update the status on my Facebook PAGE Wall. Are there additional parameters that I can add to the authorize.php url to specify authorizing the PAGE and not just my profile? Or, are there better ways to post updates to Fan Page Walls? Thanks!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >