Connect multiple apps.

Comments

1 comment

  • Brian Stengaard

    Hi Indika,

    You'll have to reset the authentication between fetching from the apps. 

    # prepare client
    Podio::setup($client_id, $client_secret);

    # fetch data for app_a
    Podio::authenticate_with_app($app_a_id, $app_a_token);
    $items_a = PodioItem::filter($app_a_id);
    print "app A: ".count($items_a)."\n";

    # reset Auth stuff
    Podio::clear_authentication();

    # fetch data for app_b
    Podio::authenticate_with_app($app_b_id, $app_b_token);
    $items_b = PodioItem::filter($app_b_id);
    print "app B: ".count($items_b)."\n";

    This will print out the respective counts for both apps. Of course you can be a bit more clever on when to reset the auth in a real application.

    Cheers,

    Brian

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk