New Homepage Forums Social Media Shields post clock on facebook.

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by avatar Eslam Ali 4 years, 7 months ago. This post has been viewed 751 times

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10241
    Rodrigo Abel
    Participant

    hi, I want to post the clock on my facebook, any help?
    <pre class=”lang:c++ range:1-38 decode:true “>
    #define CUSTOM_SETTINGS
    #define INCLUDE_CLOCK_SHIELD
    #define INCLUDE_FACEBOOK_SHIELD

    /* Include 1Sheeld library. */
    #include <OneSheeld.h>

    /* Define some variables for the date and time. */
    int hour, minute, second, day, month, year;

    void setup()
    {
    /* Start communication. */
    OneSheeld.begin();
    /* Start the clock shield. */
    Clock.queryDateAndTime();
    }

    void loop()
    {
    /* Always get the date and time. */
    hour = Clock.getHours();
    minute = Clock.getMinutes();
    second = Clock.getSeconds();
    day = Clock.getDay();
    month = Clock.getMonth();
    year = Clock.getYear();

    //Facebook.post(minute);

    OneSheeld.delay(60000);

    }
     

    #10242
    avatarEslam Ali
    Participant

    Hi Rodrigo,

    Yeah it’s pretty simple all you have to do first is to convert the numerics to strings using itoa for example and then give the converted to the post function of Facebook to do the rest 😉..

    Please let me know if u couldn’t get my words

    #10272
    Rodrigo Abel
    Participant

    thanks Eslam, I already did do it

    #10290
    avatarEslam Ali
    Participant

    Hi Rodrigo,

    Well done …! and please let us know if there are any other barriers 😉 .

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.