This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $data = array(/*..some huge array..*/); | |
| do { | |
| $current = current($data); | |
| $key = key($data); | |
| $next = next($data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $result = array( | |
| array( | |
| 'dimensions' => array('year' => '2011', 'browser' => 'win/chrome', ..), | |
| 'metrics' => array('visits' => '23804', ..), | |
| ), | |
| .. | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| APP_ID=$1 | |
| APP_SECRET=$2 | |
| ## aquire an app login access token | |
| TOKEN_URL="https://graph.facebook.com/oauth/access_token?client_id="$APP_ID"&client_secret="$APP_SECRET"&grant_type=client_credentials" | |
| TOKEN=`curl -s $TOKEN_URL` | |
| ## create a secret event |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <body> | |
| <div id="fb-root"></div> | |
| <script src="http://connect.facebook.net/en_US/all.js"></script> | |
| <script src="/path/to/facebook/src/addon/perm.js"></script> | |
| <button id="button1" type="button">Click Me 1!</button> | |
| <button id="button2" type="button">Click Me 2!</button> | |
| <button id="button3" type="button">Click Me 3!</button> | |
| <script type="text/javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $app_1 = $container->get('caefer_facebook_canvas_app.app.app_1'); | |
| $app_2 = $container->get('caefer_facebook_canvas_app.app.app_2'); | |
| // this will still work and act as an alias to the first app configured (app_1) | |
| $fb = $container->get('caefer_facebook_canvas_app.api'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| caefer_facebook_canvas_app: | |
| file: "%kernel.root_dir%/../vendor/facebook/src/facebook.php" | |
| apps: | |
| app_1: | |
| app_id: xxxxx | |
| secret: xxxxx | |
| app_2: | |
| app_id: yyyyy | |
| secret: yyyyy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| security: | |
| access_control: | |
| - { path: /secure-1/, role: [FACEBOOK_PERMISSION_READ_STREAM,FACEBOOK_PERMISSION_PUBLISH_STREAM] } | |
| - { path: /secure-2/, role: [FACEBOOK_PERMISSION_READ_STREAM,FACEBOOK_PERMISSION_CREATE_EVENT] } | |
| - { path: .*, role: [IS_AUTHENTICATED_ANONYMOUSLY] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user_about_me,user_activities,user_birthday,user_education_history,user_events,user_groups,user_hometown,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_photos,user_relationships,user_relationship_details,user_religion_politics,user_status,user_videos,user_website,user_work_history,email,read_friendlists,read_insights,read_mailbox,read_requests,read_stream,xmpp_login,ads_management,user_checkins | |
| friends_about_me,friends_activities,friends_birthday,friends_education_history,friends_events,friends_groups,friends_hometown,friends_interests,friends_likes,friends_location,friends_notes,friends_online_presence,friends_photo_video_tags,friends_photos,friends_relationships,friends_relationship_details,friends_religion_politics,friends_status,friends_videos,friends_website,friends_work_history,manage_friendlists,friends_checkins | |
| publish_stream,create_event,rsvp_event,sms,offline_access,publish_checkins,manage_pages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $pictureUrl = $this->generateUrl('fb_cdn_image', array('url' => urlencode($pictureUrl)), true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fb_cdn_image: | |
| pattern: /_fbcdnproxy/{url} | |
| defaults: { _controller: MyBundle:Image:proxy } | |
| requirements: | |
| url: .* |