ich beschäftige mich gerade ganz neu mit der Materie. Ich konnte auch schon ein ganz Teil lernen und verstehen. Jetzt bin ich aber an ein Problem angekommen wo ich nicht weiter komme.
Nach dem ich meinen esp8266 (NodeMCU) ein wenig getestet habe wollte ich anfangen mir einen Instagram Follower Counter zubasteln es gibt ja einige Videos davon. Ich nutze die InstgramStats von Brian Lough. Später sollen die Daten dann auch auf ein Display angezeigt werden.
Die Wlan Daten habe ich eingetragen und er baut eine Verbindung auf. Im Monitor kann ich sehen das er versucht die Follower Zahlen abzurufen. Es kommt aber nur eine 0. Nur ein einziges Mal zeigte er die richtige Follower Zahl an.
Ich weiß nicht mehr voran es ligen kann. (hab auch schon verschidene Instagram Accounts probiert)
Hat vielleich noch einer eine Idee?
sorry hatte ich vergessen, hatte nur ein Screenshot der Meldung angefügt. Hier ist der Code:
/*******************************************************************
* An example of usisng the InstagramStats library to get
* info on a given user.
*
* Written by Brian Lough
* https://www.youtube.com/channel/UCezJOfu7OtqGzd5xrP3q6WA
*******************************************************************/
#include "InstagramStats.h"
// ----------------------------
// Standard Libraries - Already Installed if you have ESP8266 set up
// ----------------------------
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
// ----------------------------
// Additional Libraries - each one of these will need to be installed.
// ----------------------------
#include "JsonStreamingParser.h"
// Used to parse the Json code within the library
// Available on the library manager (Search for "Json Streamer Parser")
// https://github.com/squix78/json-streaming-parser
//------- Replace the following! ------
char ssid[] = "xxxx"; // your network SSID (name)
char password[] = "xxxx"; // your network key
WiFiClientSecure client;
InstagramStats instaStats(client);
unsigned long delayBetweenChecks = 60000; //mean time between api requests
unsigned long whenDueToCheck = 0;
//Inputs
String userName = "drohnenfischer"; // from their instagram url https://www.instagram.com/brian_lough/
void setup()
{
Serial.begin(115200);
// Set WiFi to station mode and disconnect from an AP if it was Previously
// connected
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);
// Attempt to connect to Wifi network:
Serial.print("Connecting Wifi: ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(500);
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
IPAddress ip = WiFi.localIP();
Serial.println(ip);
// If using ESP8266 Core 2.5 RC, uncomment the following
// client.setInsecure();
}
void getInstagramStatsForUser()
{
Serial.println("Getting instagram user stats for " + userName);
InstagramUserStats response = instaStats.getUserStats(userName);
Serial.println("Response:");
Serial.print("Number of followers: ");
Serial.println(response.followedByCount);
}
void loop()
{
unsigned long timeNow = millis();
if ((timeNow > whenDueToCheck))
{
getInstagramStatsForUser();
whenDueToCheck = timeNow + delayBetweenChecks;
}
}
Hab jetzt den Verdacht das das vieleicht direkt mit Instagram was zutun hat
vielleicht waren das beim testen soviele Anfragen das da irgendwas gesperrt wurde.