Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    red flag FaceBook Graph API with Link on a Page Help

    Hi all,

    After I have reading the FaceBook Developer, still not too understand how it work,

    I have a FaceBook Page Link, let said it id is call "878645343" like that. And inside this FB Page, I have add some "Link" Share on it.

    Now I want to integration the "Link" Share to my Zen Cart 1.3.9h.

    How to coding?

    http://developers.facebook.com/docs/reference/api/link/

    This just give me the something bring me to a URL
    [FONT=&quot]http://developers.facebook.com/tools/explorer/?method=GET&path=[/FONT]878645343

    like that, but later how to? And It look like ask for the Access Token ...

    Any user are successful integration FB Page Link with Graph API on your Zen Cart? Can you give me the coding example, I am real new on it and read the reference many many time since not find what the coding I can starting...



    Thank you of your time.

  2. #2
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    red flag Re: FaceBook Graph API with Link on a Page Help

    I have make the APP ID for a App and this APP have the securt etc.

    And on the Graph API Explorer I can give some coding like that

    Code:
    {
      "data": [
        {
          "id": "335940369797131", 
          "from": {
            "name": "miracle-mart", 
            "category": "Games/toys", 
            "id": "172120544761"
          }, 
          "message": "http://www.miracle-mart.com/store/in...ain_page=index", 
          "picture": "http://external.ak.fbcdn.net/safe_image.php?d=AQC0gJirzN6cpDr_&w=90&h=90&url=http\u00253A\u00252F\u00252Fwww.miracle-mart.com\u00252Fstore\u00252Fimages\u00252Fcharger\u00252FSK-100011.jpg", 
          "link": "http://www.miracle-mart.com/store/in...ain_page=index", 
          "name": "IMax New Chargers in stock now", 
          "icon": "http://static.ak.fbcdn.net/rsrc.php/...S8ecmYRys0.gif", 
          "created_time": "2012-04-11T19:47:58+0000"
        }, 
        {
          "id": "179082288879480", 
          "from": {
            "name": "miracle-mart", 
            "category": "Games/toys", 
            "id": "172120544761"
          }, 
          "message": "http://www.miracle-mart.com/store/in...oducts_id=8563", 
          "picture": "http://external.ak.fbcdn.net/safe_image.php?d=AQADaZIrR0Sxjzia&w=90&h=90&url=http\u00253A\u00252F\u00252Fwww.miracle-mart.com\u00252Fstore\u00252Fimages\u00252Fmedium\u00252Fairbase\u00252FAIRWGCP10A_MED.jpg", 
          "link": "http://www.miracle-mart.com/store/in...oducts_id=8563", 
          "name": "Brushless converter with 10A ESC for Genius CP", 
          "description": "   Brushless converter with 10A ESC for Genius CP [AIRWGCP10A] - Program  Setting Download Plug and Play, No soldering work is required Built in  Brushed-To-Brushless Signal Converter Built in Speed Controller︰10.0A  rating (3.7v) Light weight-- 2.5 gram", 
          "icon": "http://static.ak.fbcdn.net/rsrc.php/...S8ecmYRys0.gif", 
          "created_time": "2012-04-11T19:46:20+0000"
        },
    My questions is, how to using above inform to make a html output and layout to show to my customer that all Link Share Content...

    And coding example?

  3. #3
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: FaceBook Graph API with Link on a Page Help

    Hi,

    My think is like that format!!!

    http://explorerhome.dyndns.org/photo...LinksShare.jpg


  4. #4
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    red flag Re: FaceBook Graph API with Link on a Page Help

    How to using the Graph API go take a "Page"'s Links Share like above image?

  5. #5
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: FaceBook Graph API with Link on a Page Help

    I am already download the PHP SDK and upload it to the server, but how to using the API to call the Page's Links Share,

    Such as below coding I need changing it value to ???

    Code:
    $naitik = $facebook->api('/me/links');

    Thank you.

  6. #6
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    red flag Re: FaceBook Graph API with Link on a Page Help


  7. #7
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    red flag Re: FaceBook Graph API with Link on a Page Help

    Hi All,

    I am final ALMOST do it all, but have a big problems to load the image
    Please see it at http://www.miracle-mart.com/FB2 the image all lose.

    I am self change some FQL on the original by there
    http://www.codeofaninja.com/2011/07/...r-website.html


    Here are my php what I am changed, anyone can teach me how to fix the images parts?

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:fb="http://www.facebook.com/2008/fbml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Display Facebook Events to You Website</title>
    <style type='text/css'>
    /*adding some styles*/
    .event{
    background-color: #E3E3E3;
    margin: 0 0 5px 0;
    padding: 5px;
    }
    </style>
    </head>
    <body>
    <?php
    //we have to set timezone to California
    date_default_timezone_set('America/Los_Angeles');

    //requiring FB PHP SDK
    require 'fb-sdk/src/facebook.php';

    //initializing keys
    $facebook = new Facebook(array(
    'appId' => '',
    'secret' => '',
    'cookie' => true, // enable optional cookie support
    ));

    //just a heading
    echo "<div style='font-weight: bold; margin: 0 0 20px 0;'>";
    echo "This event list is synchronized with this ";
    echo "<a href='https://www.facebook.com/pages/COAN-Dummy-Page/221167777906963?sk=events'>";
    echo "COAN Dummy Page Events</a></div>";

    //query the events
    //we will select name, start_time, end_time, location, description this time
    //but there are other data that you can get on the event table (https://developers.facebook.com/docs...nce/fql/event/)
    //as you've noticed, we have TWO select statement here
    //since we can't just do "WHERE creator = your_fan_page_id".
    //only eid is indexable in the event table, sow we have to retrieve
    //list of events by eids
    //and this was achieved by selecting all eid from
    //event_member table where the uid is the id of your fanpage.
    //*yes, you fanpage automatically becomes an event_member
    //once it creates an event
    $fql = "SELECT link_id, owner, owner_comment, created_time, title, summary, url, image_urls
    FROM link WHERE owner = 172120544761
    ORDER BY created_time asc";

    $param = array(
    'method' => 'fql.query',
    'query' => $fql,
    'callback' => ''
    );

    $fqlResult = $facebook->api($param);


    //looping through retrieved data
    foreach( $fqlResult as $keys => $values ){
    //see here http://php.net/manual/en/function.date.php for the date format I used
    //The pattern string I used 'l, F d, Y g:i a'
    //will output something like this: July 30, 2015 6:30 pm

    //getting 'start' and 'end' date,
    //'l, F d, Y' pattern string will give us
    //something like: Thursday, July 30, 2015
    $start_date = date( 'l, F d, Y', $values['start_time'] );
    $end_date = date( 'l, F d, Y', $values['end_time'] );

    //getting 'start' and 'end' time
    //'g:i a' will give us something
    //like 6:30 pm
    $start_time = date( 'g:i a', $values['start_time'] );
    $end_time = date( 'g:i a', $values['end_time'] );

    //printing the data
    echo "<div class='event'>";
    echo "<div style='float: left; margin: 0 8px 0 0;'>";
    echo "<img src={$values['image_urls']} />";
    echo "</div>";
    echo "<div style='float: left;'>";
    echo "<div style='font-size: 26px'>{$values['title']}</div>";
    if( $start_date == $end_date ){
    //if $start_date and $end_date is the same
    //it means the event will happen on the same day
    //so we will have a format something like:
    //July 30, 2015 - 6:30 pm to 9:30 pm
    echo "<div>on {$start_date} - {$start_time} to {$end_time}</div>";
    }else{
    //else if $start_date and $end_date is NOT the equal
    //it means that the event will will be
    //extended to another day
    //so we will have a format something like:
    //July 30, 2013 9:00 pm to Wednesday, July 31, 2013 at 1:00 am
    echo "<div>on {$start_date} {$start_time} to {$end_date} at {$end_time}</div>";
    }
    echo "<div>Location: " . $values['url'] . "</div>";
    echo "<div>More Info: " . $values['summary'] . "</div>";
    echo "</div>";
    echo "<div style='clear: both'></div>";
    echo "</div>";

    }

    ?>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js">
    </script>
    <script type='text/javascript'>
    //just to add some hover effects
    $(document).ready(function(){

    $('.event').hover(
    function () {
    $(this).css('background-color', '#CFF');
    },
    function () {
    $(this).css('background-color', '#E3E3E3');
    }
    );

    });
    </script>
    </body>
    </html>

 

 

Similar Threads

  1. v151 facebook scraper/google linter can't find my urls with Numinix Facebook Like
    By flernebunu in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Mar 2013, 11:25 AM
  2. I want to add Facebook open graph tags
    By stevemax in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Jul 2011, 07:07 PM
  3. Where do I add facebook open graph tags?
    By surlybroad in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 25 May 2011, 04:12 PM
  4. How do I add a link pointing to my Facebook page?
    By pazdar in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 Feb 2010, 03:02 PM
  5. Help with EZ-page link and Header
    By untitled10101 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 15 Jan 2008, 02:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR