• 20-10-2024, 13:31:16
    #1
    Merhaba, X API için developer hesabı açtım, Tüm key ve secret mevcut. https://github.com/noweh/twitter-api-v2-php paketini kullanarak çekmeye çalıştım. Ancak aşağıdaki gibi bir hata veriyor. Hesap ile alakalı gibi görünüyor. Daha önce kullanan ya da hatanın ne olduğunu anlayan var mı? Ücretli ücretsiz yardım istiyorum.

    Hata
    Uncaught RuntimeException: {"client_id":"29484007","detail":"When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.","registration_url":"https://developer.twitter.com/en/docs/projects/overview","title":"Client Forbidden","required_enrollment":"Appropriate Level of API Access","reason":"client-not-enrolled","type":"https://api.twitter.com/2/problems/client-forbidden"}
  • 20-10-2024, 14:07:16
    #2
    Twitter için sürekli güncel kullandığım bir rest api, https://github.com/abraham/twitteroauth dener misiniz? Sorunsuz follow, likes, retweet, reply yaptirabiliyorum.
  • 20-10-2024, 14:17:27
    #3
    Hocam şimdi denedim. Bağlantı başarılı oluyor. users/me metodundan bilgiler geliyor. Ancak twitleri çekemedim. Bir örnek paylaşır mısın?
  • 20-10-2024, 14:44:56
    #4
    def2easy adlı üyeden alıntı: mesajı görüntüle
    Twitter için sürekli güncel kullandığım bir rest api, https://github.com/abraham/twitteroauth dener misiniz? Sorunsuz follow, likes, retweet, reply yaptirabiliyorum.
    Konuda verdiği hatayı veriyor hocam.
  • 20-10-2024, 15:15:20
    #5
    emrahakin adlı üyeden alıntı: mesajı görüntüle
    Konuda verdiği hatayı veriyor hocam.
    Kullandığınız dev hesaptan oluşturduğunuz uygulama da okuma ve yazma izni var mı. 3.seçenek seçili olması lazim.

    require "vendor/autoload.php";
    
    use AbrahamTwitterOAuthTwitterOAuth;
    
    // API anahtarlarını gir
    $consumerKey = 'API_KEY';
    $consumerSecret = 'API_SECRET';
    $accessToken = 'ACCESS_TOKEN';
    $accessTokenSecret = 'ACCESS_SECRET';
    
    // Twitter API'ye bağlan
    $connection = new TwitterOAuth($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret);
    
    // Belirtilen kullanıcının tweetlerini çek
    $username = 'futbolalemi'; // Kullanıcı adı
    $tweets = $connection->get("statuses/user_timeline", ["screen_name" => $username, "count" => 10]);
    
    // Tweetleri yazdır
    foreach ($tweets as $tweet) {
        echo $tweet->text . "<br>";
    }
    Kullandığım basit bir dokümanı sizin için paylaşıyorum.
  • 20-10-2024, 15:29:27
    #6
    proje oluştur api keyi projeye bağla diyor