OAuth.h for twitter API

Hi,
i am working in a university project, and i want to use Twitter API with Oauth authorization from arduino, i have tried with rthe first library you see it here in this post http://arduino.cc/forum/index.php/topic,156599.0.html, so we can post a tweet with library,
but i found a new one that give access to all Twitter API, with the GET o POST method.here is the library
https://github.com/ReturnPath/contextio-arduino,

i want to use a GET methode for an API, FOR EXAMPLE GET /1.1/statuses/home_timeline.json, FOR THAT THE LIBRARY METHOD IS :

OAuth twitter (buffer,sizeof(buffer));
twitter.get(const char *server, const char *uri, std::map <const char *, const char *> [font=Verdana]*params[/font], const char [font=Verdana]*body[/font])

how can i declare params and body variables in this method??
any help please.

The 'body' is just a pointer to a null-terminated character string.

The 'params' are a 'map' object (http://www.cplusplus.com/reference/map/map/map/) where the index and values are both character strings.

#include <map>
std::map<char *, char*> myParameters = {{"param1name","param1value"}, {"param2name","param2value"},{"param3name","param3value"}};

myParameters["parameter4name"] = "parameter4value";
myParameters["parameter5name"] = "parameter5value";

hi,
i modified the library for a WifiShield. and i try with this code:

#include <map>
uint8_t server_ip=(199,59,150,39);
char buffer[512];
OAuth twitter(buffer,sizeof(buffer));
char ssid[]="WLAN_C194";
char pass[]="1DFAABEDNB0722918728";
const static char server[] PROGMEM="api.twitter.com";
const static char uri1[] PROGMEM="/1.1/direct_messages/new.json";
WiFiClient client;
void setup()
{
   WiFi.begin(ssid,pass);
   Serial.begin(9600);
   Serial.println("connecting to wlan ...");
   delay(1000); 
   twitter.set_endpoint(PSTR("api.twitter.com"),PSTR("/1.1/direct_messages/new.json"), server_ip, 80, false);
 
   twitter.set_client_id(PSTR("************************"),PSTR("*************************************"));
   twitter.set_account_id(PSTR("********************************"),PSTR("************************************"));
   twitter.set_account_id(256, 384);
    if (twitter.is_ready())
    {
      Serial.println("twitter is ready");
      std::map<char *, char*> params;
      params["text"] = "hello posting my first direct tweet";
      params["screen_name"] = "********";
      const char *body;
      twitter.post(server,uri1,params,body);
     
    }
    else
    {
      Serial.println("bad connection");
    }
 
}

the result
OAuthejemplo.ino: In function 'void setup()':
OAuthejemplo:43: error: no matching function for call to 'OAuth::post(const char [16], const char [30], std::map<char*, char*, std::less<char*>, std::allocator<char*> >&, const char*&)'
D:\ETSIT sistemas electronicos\arduino-1.0.3\libraries\OAuth/OAuth.h:75: note: candidates are: bool OAuth::post(const char*, const char*, std::map<const char*, const char*, std::less<const char*>, std::allocator<const char*> >, const char)
what should i do ? how can i declare the variable?
any help please

twitter.get(
    const char *server, 
    const char *uri, 
    std::map <const char *, const char *> *params,
    const char *body)

It says you are trying to pass:

OAuth::post(
    const char [16], 
    const char [30], 
    std::map<char*, char*, std::less<char*>, std::allocator<char*> >&, 
   const char*&)
[/code[
and that the closest candidate is:
[code]
OAuth::post(
     const char*, 
     const char*, 
     std::map<const char*, const char*, std::less<const char*>, std::allocator<const char*> >*, 
    const char*)

The biggest differences are that the 'params' and 'body' values are being passed as references when they should be passed as pointers.

I'm not sure how to fix that. My first guess would be to pass &params and &body.

Good luck.

(Don't the libraries include examples you can follow?)[/code]