Search Results

Search found 14989 results on 600 pages for 'facebook api'.

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

  • Getting Facebook App's User Public Information

    - by geoffrobinson
    I have a client who would like to pull public information about people who "like" some of their web pages or are associated with their Facebook app. I wanted to do a proof of concept, but we really don't about any particular methodology. Another option we want to explore is to assume we have captured a Facebook user ID/email. Can we use that to collect public profile information?

    Read the article

  • anonymous post Twitter, Facebook

    - by Bharanikumar
    Hi , Actually am doing shopping cart application , after good are transfered we are asking the feedback about our service , So customer will give the feedback, this feedback form contain the about our service , the ans are in the rating also we given an comment form , in that they writing something about our servce , So we have idea , that is post these good comment into twitter adn facebook, But customer not showed much interest to login into twitter and then share the twits , So is there any way that without account post the twits , Thanks Bharanikumar How to post twit msg in twitter and facebook without account ,

    Read the article

  • Facebook JS SDK FB.logout() doesn't terminate user session

    - by Casey Flynn
    I'm attempting to log a user out of facebook with the Facebook JS SDK, however calling: FB.logout(function(response){ console.log(response); }); returns: response.status == "connected" And only after refreshing the page does the SDK realize that the session has ended. Anyone know what could be causing this behavior? This code previously worked in my application and has recently started behaving this way. Another example using FireBug:

    Read the article

  • How to tag photos in facebook-api?

    - by Camillo
    Hey, I wanted to ask if/how is it possible to tag a photo using the FB API (Graph or REST). I've managed to create an album and also to upload a photo in it, but I stuck on tagging. I've got the permissions and the correct session key. My code until now: try { $uid = $facebook->getUser(); $me = $facebook->api('/me'); $token = $session['access_token'];//here I get the token from the $session array $album_id = $album[0]; //upload photo $file= 'images/hand.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)); $search = array('{"id":', "}"); $delete = array("", ""); // picture id call with $picture $picture = str_replace($search, $delete, $data); //here should be the photos.addTag, but i don't know how to solve this //above code works, below i don't know what is the error / what's missing $json = 'https://api.facebook.com/method/photos.addTag?pid='.urlencode($picture).'&tag_text=Test&x=50&y=50&access_token='.urlencode($token); $ch = curl_init(); $url = $json; 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_exec($ch); } catch(FacebookApiException $e){ echo "Error:" . print_r($e, true); } I really searched a long time, if you know something that might help me, please post it here :) Thanks for all your help, Camillo

    Read the article

  • Erlang Facebook Example

    - by werg
    Does anyone know of an example facebook app (or facebook connect app) done in Erlang? I'm looking for something that includes the whole process. Specifically I don't seem to find anything on user authentication. I've checked out erlang_facebook, erlang2facebook and erlyface but none of them seem to offer a simple and comprehensive example accessible to me as a beginner . I'd be happy for just a bit of code to plough through though, preferably using mochiweb as backend.

    Read the article

  • Facebook require_login() in iFrame App

    - by LapKom
    Hi, I have serious problem with iframe application. I need to use many external JS libraries and other dynamic stuuf so FMBL application can't be done. When I call require_login() I get applicaition installing dialog when app is not already installed, which is ok. But then after authorization application enters an endless redirect loop with parameters like auth_token, installed and so. Yesterday I managed to fix this, but today it's broken again... What the heck is happening with FB? It's driving me crazy to find a sollution, none of ones found on net doesn't seem to be working. So far I tried: http://abhirama.wordpress.com/2010/03/07/facebook-iframe-xfbml-app/ (7th march 2010!) http://forum.developers.facebook.com/viewtopic.php?pid=156092 http://www.keywordintellect.com/facebook-development/how-to-set-up-a-facebook-iframe-application-in-php-in-5-minutes/ http://www.markdeepwell.com/2010/02/validating-a-facebook-session-within-an-iframe/ http://forum.developers.facebook.com/viewtopic.php?pid=210449 http://www.ajaxlines.com/ajax/stuff/article/facebook_fbml_rendering_in_iframe_application.php http://www.aratide.com/php/solving-the-break-out-issue-in-iframe-facebook-applications/ None of the above worked... According to those and some FB docs: http://wiki.developers.facebook.com/index.php/FB_RequireFeatures http://wiki.developers.facebook.com/index.php/Cross_Domain_Communication_Channel My example test files look as follow: <?php //Link in library. require_once '../application/vendor/Facebook/facebook.php'; //Authentication Keys $appapikey = 'XXXX'; $appsecret = 'XXXX'; //Construct the class $facebook = new Facebook($appapikey, $appsecret); //Require login $user_id = $facebook->require_login(); ?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <title></title> </head> <body> <script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> This is you: <fb:name uid="<?php echo $user_id?>"></fb:name> <?php var_dump($facebook->$this->facebook->api_client->friends_get())?> <script type="text/javascript"> FB_RequireFeatures(["XFBML"], function(){ FB.Facebook.init("<?=$appapikey?>", "xd_receiver.html"); }); </script> </body> </html> And cross-domain file xd_receiver.html is: <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>cross-domain receiver page</title> </head> <body> <script src="http://static.ak.facebook.com/js/api_lib/v0.4/XdCommReceiver.js" type="text/javascript"></script> </body> </html> How do I get it working? I'm using Kohana framework to do this and already replaced header('Location') with url::redirect() in facebook php library.

    Read the article

  • Choose Graph API or old REST API for Facebook application

    - by Andree
    Hi there! I should have asked this in Facebook developer forum instead, but somehow I can't register to the forum and the Facebook connect feature is not working at the time I'm writing this. Anyway, I am still confused whether to use Graph API or the old REST API for my Facebook app. Generally, this is what I want to achieve in my app: Get profile picture and name of the user. Get profile picture and name of the user's friends who are also using my app. Post into the user's stream. Allow users to invite their friends to use the application. Can someone provide me an insight, which one is better for my application?

    Read the article

  • Easily Add Facebook Chat to Pidgin

    - by Matthew Guay
    Want to keep in touch with your Facebook friends throughout the day?  Here we’ll show you how to easily add Facebook chat to the popular multi-protocol chat client Pidgin. Facebook has recently added support for XMPP chat, which means you can easily add it to popular chat clients such as Pidgin.  Previously you could only add Facebook chat to Pidgin through a plug-in that didn’t always work correctly.  Here we’ll walk you through setting up your Facebook account in Pidgin. Getting Started First, make sure you have a username for your Facebook account (link below).  This is a relatively new feature for Facebook, so if you’ve had your account for a while you may need to choose one.    If you already have one, you should see it listed instead. Now, open Pidgin, and click Manage Accounts. Click Add… Then select XMPP from the Protocol list. Now, enter your Facebook username without the facebook.com part (e.g your.facebook.username, not http://www.facebook.com/your.user.name).  Then, enter chat.facebook.com for the Domain, and enter your standard Facebook password.  You can check the “Remember password” box if you’d like Pidgin to automatically sign in to Facebook chat. Now, click on the Advanced tab, and uncheck the “Require SSL/TLS” box.  Also, make sure the Connect port is 5222.  Click Add, and your Facebook account is added to Pidgin. Now Facebook will show up in your list of accounts, with the username your.facebook.username@chat.facebook.com. Your Facebook friends will show up directly in your Buddy list, complete with their full name and Facebook profile picture.  Any users that are not in a group will show under your standard list, while ones in a Facebook group will be shown in a separate group.  You can move which groups your Facebook friends show up in, just like you can with other chat contacts.   And no matter if your friend is logged in on the standard Facebook website or through another chat application, it will work the same as always.   This is a great way to keep in touch with your Facebook friends throughout the day.  If you like Facebook chat and already use Pidgin, now you can keep from switching between programs and just chat with all your friends from a central location. Links: Download Pidgin Set your Facebook username Similar Articles Productive Geek Tips The How-To Geek is No Longer on FacebookWin a Free iPod Touch in the How-To Geek Facebook Giveaway!Block Those Irritating Facebook Quiz & Application MessagesPut Your Pidgin Buddy List into the Windows Vista SidebarHow to Lock Down Your Facebook Account TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional Make your Joomla & Drupal Sites Mobile with OSMOBI Integrate Twitter and Delicious and Make Life Easier Design Your Web Pages Using the Golden Ratio Worldwide Growth of the Internet How to Find Your Mac Address Use My TextTools to Edit and Organize Text

    Read the article

  • Facebook: Hide Your Status Updates From Your Boss/Ex or Any Specific Friend

    - by Gopinath
    Sometime we want to hide our status updates from specific people who are already accepted as Friends in Facebook. Do you wonder why we need to accept someone as friend and then hide status updates from them? Well, may be you have to accept a friend request from your boss, but certainly love to hide status updates as well as other Facebook activities from him. Something similar goes with few annoying friends whom you cant’ de-friend but like to hide your updates. Thanks to Facebook for providing fine grain privacy options on controlling what we want to share and with whom we want to share. It’s very easy to block one or more specific friends from seeing your status updates. Here are the step by step instructions: 1. Login to Facebook and go to Privacy Settings Page. It shows a page something similar to what is shown in the below image. 2. Click on “Customize settings” link 3. Expand the privacy options available in the section Things I Share -> Posts by me. Choose Customise from the list of available options   4. Type the list of unwanted friend’s names in to input box of the section "Hide this from”. Here is a screen grab of couple of my friends whom I added for writing this post 5. Click the Save Settings button. That’s all. Facebook will ensure that these people will not see your status updates on their news feed. Enjoyed the Facebook Tip? Join Tech Dreams on Facebook to read all our blog posts on your Facebook’s news feed. Join us on Facebook to read all our stories right inside your Facebook news feed.

    Read the article

  • Posting to Facebook Page using C# SDK from "offline" app

    - by James Crowley
    If you want to post to a facebook page using the Facebook Graph API and the Facebook C# SDK, from an "offline" app, there's a few steps you should be aware of. First, you need to get an access token that your windows service or app can permanently use. You can get this by visiting the following url (all on one line), replacing [ApiKey] with your applications Facebook API key. http://www.facebook.com/login.php?api_key=[ApiKey]&connect_display=popup&v=1.0 &next=http://www.facebook.com/connect/login_success.html&cancel_url=http://www.facebook.com/connect/login_failure.html &fbconnect=true&return_session=true&req_perms=publish_stream,offline_access,manage_pages&return_session=1 &sdk=joey&session_version=3 In the parameters of the URL you get redirected to, this will give you an access key. Note however, that this only gives you an access key to post to your own profile page. Next, you need to get a separate access key to post to the specific page you want to access. To do this, go to https://graph.facebook.com/[YourUserId]/accounts?access_token=[AccessTokenFromAbove] You can find your user id in the URL when you click on your profile image. On this page, you will then see a list of page IDs and corresponding access tokens for each facebook page. Using the appropriate pair, you can then use code like this: var app = new Facebook.FacebookApp(_accessToken); var parameters = new Dictionary { { "message" , promotionInfo.TagLine }, { "name" , promotionInfo.Title }, { "description" , promotionInfo.Description }, { "picture", promotionInfo.ImageUrl.ToString() }, { "caption" , promotionInfo.TargetUrl.Host }, { "link" , promotionInfo.TargetUrl.ToString() }, { "type" , "link" }, }; app.Post(_targetId + "/feed", parameters); And you're done!

    Read the article

  • Facebook Insights for Page via the API

    - by Wes
    Using the new API, is it possible to get the insights (analytics) data from a page that you are an admin of? I can successfully get the data from an app I own, but its not clear how to do this for a page. If not, is it possible to download the CSV of data from the API?

    Read the article

  • How to telnet into facebook chat

    - by OSX Jedi
    I was able to use facebook chat with an external application using the following information: First, find your Facebook username by going to http://www.facebook.com/your_user/. Next, Open iChat, then select iChat » Preferences and click on the Accounts tab. Click on the + (plus) sign to add a new account, with these settings: * Account Type is Jabber Account * Account name is your_user@chat.facebook.com, and enter your password * Click the drop-down arrow to reveal Server options. Enter chat.facebook.com as the server name. * Enter 5222 as the port and click Done. Click Done again, and you are good to go. From reading this, it seems that it might be possible to telnet into facebook chat. I tried, but wasn't able to. Is it possible? How?

    Read the article

  • Merge two different API calls into One

    - by dhilipsiva
    I have two different apps in my django project. One is "comment" and an other one is "files". A comment might save some file attached to it. The current way of creating a comment with attachments is by making two API calls. First one creates an actual comment and replies with the comment ID which serves as foreign key for the Files. Then for each file, a new request is made with the comment ID. Please note that file is a generic app, that can be used with other apps too. What is the cleanest way of making this into one API call? I want to have this as a single API call because I am in a situation where I need to send user an email with all the files as attachment when a comment is made. I know Queueing is the ideal way to do it. But I don't have the liberty to add queing to our stack now. So this was the only way I could think of.

    Read the article

  • Facebook Application Tab On Page Not Working

    - by Pankaj Khurana
    Hi, I have a working facebook fbml application tab on a page. It was working perfectly but today when i checked it was generating an error. Errors while loading page from application Parse errors: FBML Error (line 18): illegal tag "body" under "fb:tab-position" FBML Error (line 26): illegal tag "noscript" under "fb:tab-position" FBML Error (line 44): illegal tag "noscript" under "fb:tab-position" Runtime errors: HTML error while rendering tag "link": There is a hard limit of 2 css link tags on profile tabs in order to remain under the IE 31 tag limit. HTML error while rendering tag "link": There is a hard limit of 2 css link tags on profile tabs in order to remain under the IE 31 tag limit. Cannot allow external script My settings are: Canvas Callback URL: http://mydomain/myfile/ Canvas URL: http://mydomain/myfeedback/ Tab Name: Feedback Tab URL: http://apps.facebook.com/myfeedback/ This is an fbml application without any body tags I am unable to find out the reason for the same. Please help me on this. Thanks

    Read the article

  • Facebook Graph API - authorization types?

    - by Alex Cook
    I'm struggling with the new Facebook Graph API, perhaps someone here can help. Here is what I want to do: provide a ‘login w/ FB’ button, throw to /authorize, get a code, throw to /access_token, get an access_token, and be able to hit https://graph.facebook.com/me for info about the user. When I try to use type=client_cred in the /authorize call, I get an access_token that lets me hit URLs with userIDs or names, but not /me. I receive an error stating I need a valid token. If I can't hit /me, how do I figure out who the current user is? What exactly should I use in the type param if I want a website to access a users data? I've seen posts with type=web_server, etc, but I can't seem to find a sure fire way to do, what I think, is pretty simple... Thanks ahead of time for any help thats provided...

    Read the article

  • Facebook friends.getLists failing

    - by Shaun Budhram
    Hi all, I'm trying a simple request on Facebook to return all my friend lists. I'm trying this in Facebook's test console, as well as through an iPhone app i'm working on. friends.getLists (also alternatively through FQL) SELECT flid, name FROM friendlist WHERE owner=4810796 I am currently logged in, so using that number should be valid. Both are returning an empty list (not erroring out), but I am certain that I have a few friend lists set up. I've also tried using this with a test account I set up, but got the same results. I could have sworn this command was working earlier. Can anyone please either verify or reject that this is happening for them? Thanks.

    Read the article

  • How to get fan list of Facebook page or can overwite facebook social plugin css?

    - by Vaibhav Bhalke
    Hi, We are trying it with facebook social plugin. The HTML code for it as follow: <iframe border='0' src='http://www.facebook.com/plugins/likebox.php?id=1185611481&width=243&height=400&connections=15&stream=false&header=false' scrolling='yes' frameborder='0' allowTransparency='false' style='border:0px; overflow:hidden; width:243px; height:300px; background-color: #03869E; color: white;'> <iframe> As it replace inner HTML of frame on load. We want our own CSS to apply to this HTML. But as it replace whole HTML and it have its own CSS we are unable to set our CSS. We are doing this in GWT. Is there any way we can get the list of fans so we can display it as we want and can apply css? Or check given user is fan of page?

    Read the article

  • How to get fan list of Facebook page or can overwrite facebook social plugin css?

    - by Vaibhav Bhalke
    Hi, We are trying it with facebook social plugin. The HTML code for it as follow: <iframe border='0' src='http://www.facebook.com/plugins/likebox.php?id=1185611481&width=243&height=400&connections=15&stream=false&header=false' scrolling='yes' frameborder='0' allowTransparency='false' style='border:0px; overflow:hidden; width:243px; height:300px; background-color: #03869E; color: white;'> <iframe> As it replace inner HTML of frame on load. We want our own CSS to apply to this HTML. But as it replace whole HTML and it have its own CSS we are unable to set our CSS. We are doing this in GWT. Is there any way we can get the list of fans so we can display it as we want and can apply css? Or check given user is fan of page?

    Read the article

  • Facebook graph api - delete like

    - by Martin
    Hi there, I'm developing an app for Facebook in PHP, part of which lists the user's "likes". I would like to add a link next to each like so that the user can manage their likes by deleting them where they see fit. Facebook mentions this in their graph api docs: "You can delete a like by issuing a DELETE request to /POST_ID/likes (since likes don't have an ID)." But each like must have an id - how else would you delete it? Has anyone done this before, any help will be appreciated.

    Read the article

  • Facebook iOS SDK Share Dialog - Sharing on a Friend's Wall

    - by JPK
    Is it possible to use the Facebook iOS SDK Share Dialog to share on a Friend's Wall? I know that it is possible to do this using the Feed Dialog, but that provides the user with a less than optimal experience, and seems to be discouraged by Facebook. It would be fantastic if we could configure the Share Dialog to share with one particular friend. Additionally, is there a way to share with a friend privately (such that it would be sent to Messages)? I have researched pretty extensively and it seems like there is not a way to do either of these things using the iOS SDK - I would just like to confirm that I am not missing something.

    Read the article

  • Facebook API: Set User Status with "@mentions" integration

    - by JWD
    StackOverflow'ers, I realize the new "@mentions" is a very new feature to facebook, but can any of you think of how to access this feature using the Facebook API? I would assume there would need to be a separate call to get a list of available users/applications/ect... I am just brainstorming here, I realize this may not be possible yet. Any help is much appreciated. Thanks!

    Read the article

  • User must have accepted TOS - Facebook Graph API error when posting photos to group page

    - by user370309
    Hi all, I've been struggling to upload an image from the user's computer and posted to our group page using the Facebook Graph API. I was able to send a post request to facebook with the image however, I'm getting this error back: ERROR: (#200) User must have accepted TOS. To some extent, I don't believe that I need the user to authorize himself as the photo is being uploaded to our group page. This below, is the code i'm using: if($albumId != null) { $args = array( 'message' = $description ); $args[basename($photoPath)] = '@' . realpath($photoPath); $ch = curl_init(); $url = 'https://graph.facebook.com/'.$albumId.'/photos?'.$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); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $data = curl_exec($ch); $photoId = json_decode($data, true); if(isset($photoId['error'])) die('ERROR: '.$photoId['error']['message']); $temp = explode('.', sprintf('%f', $photoId['id'])); $photoId = $temp[0]; return $photoId; } Can somebody tell me if I need to request extra permissions from the user or what i'm doing wrong? Thanks very much!

    Read the article

  • Can't checkin to Facebook Places by post to api?

    - by MarcusJoe
    Hey everybody, I am trying to build an app where I let my registered user be able to check in to places on Facebook Places. I however for some reason can't seem to make this work. I assumed this is possible with the Api as write functionality has been added to it, but I couldn't find an clear explanation on the web. this is what I currently have, after I have asked the user for permission to publish checkins and for user_checkins. <?php require("src/facebook.php"); $facebook = new Facebook(array( 'appId' => 'xxxxxxxxx', 'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'cookie' => true )); # see if active session $session = $facebook->getSession(); if(!empty($session)) { try{ $uid = $facebook->getUser(); $api_call = array( 'method' => 'users.hasAppPermission', 'uid' => $uid, 'ext_perm' => 'publish_checkins' ); $can_post = $facebook->api($api_call); if($can_post){ $facebook->api('/'.$uid.'/checkins', 'POST', array( 'access_token' => $facebook->getAccessToken(), 'place' => 'place_id', 'message' =>'I went to placename today', 'picture' => 'http://www.place.com/logo.jpg', 'coordinates' => array( 'latitude' => 'lattiude', 'longitude' => 'lattitude', 'tags' => $uid, ) ) ); echo 'You were checked in'; } else { die('Permissions required!'); } } catch (Exception $e){} } else { # There's no active session,generate one $login_url = $facebook->getLoginUrl(); header("Location: ".$login_url); } ?> The code works when I change it 'checkins' to 'feed'. Is there something wrong with my code or am I trying to do somethign that isn't possible (or do it the wrong way). Any help will be greatly appreciated as I already spent quite a significant amount of time trying to fix this, but I just can't seem to make it work. Best regards, Marcus Joe

    Read the article

  • Facebook Friends.getAppUsers using Graph API

    - by Richard
    I have an application that uses the old REST API call Friends.getAppUsers to get the list of friends for the current user that have authorized my application. I have read the docs, but I can't figure out how to do this with the Graph API. Can someone give me an example?

    Read the article

  • Facebook invites partialy working..

    - by dugi007
    Hello! im new to facebook api and i have a litle problem.. i created iframe app and im using the folowing code to invite my friends. invitation screen renders and im able to send invitation. when someone accepts invitation it redirects them to the following link: http://www.facebook.com/reqs.php#!//apps.facebook.com/erste_app/ and nothing happens (only the facebook header apears and thats all)...when they manualy repost that link they are redirected to app and everything works... <?php include 'facebook.php'; define( 'FB_API_KEY', 'e23463********9c7ebfd6d34' ); define( 'FB_SECRET', '5f6************7efff5c8cb8' ); define( 'FB_APPID', '312*********23' ); define( 'FB_CANVAS_URL', 'http://apps.facebook.com/erste_app/' ); define( 'FB_APP_HOME_URL', 'http://www.bijelarukavica.com/test/' ); define( 'FB_APP_NAME', 'Zaigraj s Rokom' ); $bOK=SendStandardInvitation("", false); function SendStandardInvitation($to, $bNewStyle = true) { $typeword = FB_APP_NAME; // Warning: double quotes in the content string will screw up the invite signature process $content = '<fb:req-choice url=\' ' . FB_CANVAS_URL . '\' label=\'Check out ' . FB_APP_NAME . ' />'; // if your have post add routines take them to that add app URL instead. $actionText = 'Probaj jesi bolji od mene uz "' . FB_APP_NAME . '".'; $bOK = SendNewRequest($to, $typeword, $content, $actionText); return $bOK; } function SendNewRequest($to, $typeword, $content, $actionText, $bInvitation = true) { $facebook = new Facebook(FB_API_KEY,FB_SECRET); $to = implode(",", $facebook->api_client->friends_get('','')); $bInviteAll = (!$to || $to == "" ? true : false); $excludeFriends = null; if (!$bInviteAll) $excludeFriends = $facebook->api_client->friends_get(); else // Get all friends with the app $excludeFriends = $facebook->api_client->friends_getAppUsers(); $excludeFriendsStr = null; foreach ($excludeFriends as $userid) { $pos = strpos($to, (string)$userid); if ($pos !== false) continue; if ($excludeFriendsStr) $excludeFriendsStr .= ','; $excludeFriendsStr .= $userid; } $params = array(); $params['api_key'] = FB_API_KEY; $params['content'] = $content; // Don't use htmlentities() or urlencode() here $params['type'] = $typeword; $params['action'] = FB_CANVAS_URL ; $params['actiontext'] = $actionText; $params['invite'] = ($bInvitation ? 'true' : 'false'); $params['rows'] = '5'; $params['max'] = '20'; $params['exclude_ids'] = $excludeFriendsStr; $params['sig'] = $facebook->generate_sig($params, FB_SECRET); $qstring = null; foreach ($params as $key => $value) { if ($qstring) $qstring .= '&'; $qstring .= "$key=".urlencode($value); } $inviteUrl = 'http://www.facebook.com/multi_friend_selector.php?'; $facebook->redirect($inviteUrl . $qstring); return true; } $facebook->api_client->notifications_sendRequest function SendRequest($to, $typeword, $content, $bInvitation = true) { $facebook = new Facebook(FB_API_KEY,FB_SECRET); $image = FB_APP_HOME_URL . 'logo.gif'; $result = $facebook->api_client->notifications_sendRequest($to, $typeword, $content, $image, $bInvitation); $url = $result; if (isset($url) && $url) { $facebook->redirect($url . '&canvas=1&next=index.php'); return true; } $bOK = ($result && $result != ""); return $bOK; } SendStandardInvitation($to, $bNewStyle = false) ?>

    Read the article

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