Project

General

Profile

oauth_ini.diff

Stefan Schöfegger, 11/29/2017 10:44 PM

Download (1.84 KB)

View differences:

src/imageio/storage/flickr.c
128 128
//  const char *username = NULL;//, *frob;
129 129
  // gchar *token;
130 130
  // gchar *secret;
131
  //char *flickr_user_token = NULL;
132
  //char *flickr_user_secret = NULL;
133
  gint result;
134
  _flickr_api_context_t *ctx = (_flickr_api_context_t *)g_malloc0(sizeof(_flickr_api_context_t));
135

  
136
  flickcurl_init();
137
  ctx->fc = flickcurl_new();
138
  //flickcurl_set_oauth_client_key(ctx->fc, API_KEY);
139
  //flickcurl_set_oauth_client_secret(ctx->fc, SHARED_SECRET);
140
  //flickcurl_set_oauth_token(ctx->fc, "xxxxxxxxxxxx");
141
  //flickcurl_set_oauth_token_secret(ctx->fc, "xxxxxx");
142
  result = flickcurl_config_read_ini(ctx->fc, "/home/steve/.flickcurl.conf", "flickr",
143
                            ctx->fc, flickcurl_config_var_handler);
144
  if (result) {
145
    fprintf(stderr, "[flickr] error reading ini file\n");
146
    return 0;
131
// char *flickr_user_token = NULL;
132
// char *flickr_user_secret = NULL;
133
gint result;
134
_flickr_api_context_t *ctx = (_flickr_api_context_t *)g_malloc0(sizeof(_flickr_api_context_t));
135

  
136
flickcurl_init();
137
ctx->fc = flickcurl_new();
138
// flickcurl_set_oauth_client_key(ctx->fc, API_KEY);
139
// flickcurl_set_oauth_client_secret(ctx->fc, SHARED_SECRET);
140
// flickcurl_set_oauth_token(ctx->fc, "xxxxxxxxxxxx");
141
// flickcurl_set_oauth_token_secret(ctx->fc, "xxxxxx");
142
result = flickcurl_config_read_ini(ctx->fc, "/home/steve/.flickcurl.conf", "flickr", ctx->fc,
143
                                   flickcurl_config_var_handler);
144
if(result)
145
{
146
  fprintf(stderr, "[flickr] error reading ini file\n");
147
  return 0;
147 148
  }
148 149

  
149 150
  flickcurl_set_error_handler(ctx->fc, _flickr_api_error_handler, ctx);