• 締切済み

twitter apiについて

Error: The value of $params[screen_name] must be stringable. というエラーが出てきます。 スクリーンネームが入っていませんというエラーなのでしょうか? よろしくお願いします。

  • bajeg
  • お礼率50% (2/4)
  • PHP
  • 回答数1
  • ありがとう数1

みんなの回答

noname#218101
noname#218101
回答No.1

$params[screen_name] の値は文字型にできなければならない。変な日本語ですが、値が入っているかと、値の型の両方を調査してみたらいかがでしょうか。

関連するQ&A

  • TwitterのAPI申し込みについて

    TwitterのAPIに申し込みました。すると以下のようなメールが来ました。 これは申し込み失敗なのでしょうか? 翻訳しても意味がわかりません。 Twitter Thanks for applying for access! In order to complete our review of your application, we need additional information about your use case. The most common types of information that can help expedite our review include: The core use case, intent, or business purpose for your use of the Twitter APIs If you intend to analyze Tweets, Twitter users, or their content, share details about the analyses you plan to conduct and the methods or techniques If your use involves Tweeting, Retweeting, or liking content, share how you will interact with Twitter users or their content If you’ll display Twitter content off of Twitter, explain how and where Tweets and Twitter content will be displayed to users of your product or service, including whether Tweets and Twitter content will be displayed at row level or aggregated To provide this information to Twitter, reply to this email. Thank you for your interest in building on Twitter.

  • 某大学の試験問題なのですが・・・英語で算数的な問題で

    某大学の試験問題なのですが・・・英語で算数的な問題で The product of X and Y is a constant. If the value of X is increased by 150%, by what percentage must the value of Y be decreased? 1. 33% 2. 50% 3. 60% 4. 67% 5. 150% これXYの積が定数で、Xが1.5倍になったからYは0.666666・・・になって答えは67%じゃないんでしょうか?? どなたかお願いします!!

  • 和訳添削&構文解説をよろしくお願いします

    The latter is often held to be the best form of relationship to be had with a character. 【訳】 その言葉は、その登場人物が持たれる最も良い形の関係にしばしばくっつけられる。 ※to be had with a characterの部分の訳が分かりません。 I try to treat my own immediate perceptions as being of no more value than those of others. 【訳】 私は、他の人のより価値のない物としての即時の理解(洞察)よりも、わたし自身のものを取り扱おうと試みる。 ※thoseはimmediate perceptions as beingで、othersの後はno more valueの省略でしょうか。 Our job must now be to describe how empathy, sympathy or objectivity is scripted to happen. 今では、私たちの仕事は、いかに同情、共感な客観性が起こるために原稿を書くものと描写されなければいけない。 ※must be to describeの部分は、must be describedの言い換えのようなものでしょうか。 must be to 動詞という表現の文法が分かりません。 間違い? 舞台脚本に関する英語書籍をよんでいます 。 よろしくお願いします。

  • ’sとofの違いがよく分りません

    こんにちは。お世話になります。 英語初学者です。 表題にありますように、’sとofの違いがよく分りません。 たとえば、今、英語の児童書を読んでいるのですが、下記に挙げました英文で、 なぜ、’sを使うのか、それともofを使っているのか違いがさっぱり分らないのです。 The children went through the door of the magic house. The magic took the children to the land of the dinosaurs. It must be a dinosaur's footprint. They must be a dinosaur's eggs. どなたか、教えては下さいませんでしょうか? 宜しくお願いいたします。

  • XMLデータをRDBに格納する際のテーブル構造

    データベース初心者です。 ちょっとしたWebアプリを作成しているのですが、以下のようなXML構造のデータを RDB(SQLサーバー2008)に登録する際のテーブル構成をどのようにすればよいか困っています。 本やインターネットで調べたのですが分からなかったので、もしわかる方がいましたら教えて下さい。 【xml構造】 ※登録されたWebサービスに送るパラメータ情報の定義 <xml>  <name></name>  <url></url>  <a_params>?   <param>*    <value>| <id>| <date>   </param>  </a_params>  <b_params>?   <param>*    <value>| <id>| <date>   </param>  </b_params>  <c_params>?   <param>*    <value>| <id>| <date>   </param>  <c_params> </xml> 【タグの属性】  param : name  value : なし  id : length, prefix  date : format 【タグ後ろの記号の意味】 ? 0回または1回必要 * 0回またはn回必要 記号なし 1回必要 単純に考えると、a_params | b_params | c_params毎にそれぞれvalue | id | dateの中間テーブルを 用意することになりそうですが、そうなると最低でも合計10個(1+3×3)のテーブルができてしまいます。 以下のように中間テーブル内で、どこのフィールドで使用されているか持たせば、テーブル数も 合計7個(1+3×2)となり、冗長なテーブルも減らすことができるかと思いましたが、 他によい方法はないでしょうか? 例:子要素Valueの場合 [Applicationテーブル]  id  name  url [ApplicationValueテーブル] ←中間テーブル  ApplicationID :Applicationテーブルのid  FieldType :どこのフィールドで使用されているか(a_params or b_params or c_params)  ValueID :Valueテーブルのid [Valueテーブル]   id :PK  value RDBでの実現が難しい場合は、SQLサーバのXML機能での実現方法も教えていただきたいです。 よろしくお願いします。

  • 解き方がわかりません。

    (1)The data below is modeled by the line of best fit y = 2x - 4. (1,-2.2)(3,2)(5,1.3)(7,10)(9,13.8) Find the error between the point (-1, -2.2) and the predicted value from the modeling equation. (2)To solve 5x + 1 = 4 using a graph, a related function must be found. Find a related function for this equation. よろしくお願いします。

  • 指示詞がさすものは?

    Like any other way of expressing the human mind,it must,by the very nature of its being,be both inaccurate and incomplete of its being のitsの指すものは何でしょうか?その後に,be bothと続くのですか構造がよくわからず主語が分かりません よろしくお願いします。

  • 自作ブログのPing送信について

    お世話になります。 現在自作ブログからphpによる各PingサーバへのPing送信を試みていますが、 チェックしてみると下記のようなエラーが出てしまいます。 色々と調べて、サンプルを応用してみたのですが。。。 原因がわかりましたら是非ご教授ください。 よろしくお願いいたします。 下記のFunctionを実行します。 $titleと$siteurlの値は問題なく入っています。 function SendPing($server, $title, $siteurl){ foreach($server as $value){ //送信先サーバURLをホスト名とパス名に分解する $value = rtrim($value); $arr = parse_url($value); $host = $arr["host"]; $path = $arr["path"]; echo($host); echo"<br />"; //送信先サーバをオープンする if($sock = @fsockopen($host, 80, $errno, $errstr, 20)){ //送信データをつくる $title = urlencode($title); $siteurl = urlencode($siteurl); $params = "<?xml version=\"1.0\" ?>\r\n"; $params .= "<methodCall>\r\n"; $params .= "<methodName>weblogUpdates.ping</methodName>\r\n"; $params .= "<params>\r\n"; $params .= "<param>\r\n"; $params .= "<value>$title</value>\r\n"; $params .= "</param>\r\n"; $params .= "<param>\r\n"; $params .= "<value>$siteurl</value>\r\n"; $params .= "</param>\r\n"; $params .= "</params>\r\n"; $params .= "</methodCall>\r\n"; //送信する fputs($sock, "POST ".$path." HTTP/1.0\r\n"); fputs($sock, "Host: $host\r\n"); fputs($sock, "Content-type: text/xml\r\n"); fputs($sock, "Content-length: ".strlen($param)."\r\n"); fputs($sock, "User-Agent: MSIE7.0\r\n"); fputs($sock, "Connection: Close\r\n"); fputs($sock, "\r\n"); fputs($sock, "$param\r\n"); //リターンを受け取る $res = ""; while (!feof($sock)){ $res .= fgetc($sock); } fclose($sock); //リターンからエラーコードを解釈する preg_match("/(\<\?xml)(.*)(\<\/methodResponse\>)/s", $res, $arr); $res = preg_replace("/UTF-8/i", "utf-8", $arr[0]); echo $res."<br />"; } } } すると下記のようなエラーが出ます。 blog.goo.ne.jp faultString parse error. not well formed. error occurred at line 1, column 1, byte index 0 faultCode -32700 api.my.yahoo.co.jp ping.bloggers.jp faultCode 105 faultString XML error: Invalid document end at line 1, column 1 rpc.technorati.jp rpc.weblogs.com messageCan't accept the ping because the URL must begin with http:// or https://.legalYou agree that use of the Weblogs.com ping service is governed by the Terms of Use found at www.weblogs.com.flerror1 ping.fc2.com faultCode 1 faultString The method you requested, '', was not found. blogsearch.google.co.jp flerror1 messageUnable to parse XML-RPC request. よろしくお願いいたします。

    • ベストアンサー
    • PHP
  • twitterのbotが自動フォロー返しなくなった

    基本はEasyBotterで作ってあります 【バージョン】 Ver2.04beta 【設置鯖名】 @PAGES 【PHPのバージョン】5 【手動】 フォロー返し以外は手動も自動も正常に動いています 【実行】 GAE-Cron 【実行間隔】 2分間隔 bot.phpに $response = $eb->autoFollow(); を入れて、 EasyBotter.phpに //自動フォロー返し function autoFollow(){ $response = $this->getFollowers(); $followList = array(); foreach($response as $user){ $follow = (string)$user->following; if($follow == "false"){ $followList[] = (string)$user->screen_name; } } foreach($followList as $screen_name){ $response = $this->followUser($screen_name); } //■■フォローした時にリプライを送る■■ foreach($followList as $rscreen_name){ $value = array("status"=>"@{$rscreen_name} フォローしました"); $response = $this->setUpdate($value); $result = $this->showResult($response); $results[] = $result; } } を入れてあります。 最近まで動いていたのですが、 フォロワーが1000人を超えたあたりからなぜか動かなくなりました。 というのをEasyBotter初心者質問スレ3(http://jbbs.livedoor.jp/bbs/read.cgi/internet/6629/1287944674/)で質問したところ、 「最新のAPI確認 公式でフォロー数規定確認 」 という回答をいただきました。 確認してみたのですが 公式のフォロー数規定は超えてないようです 最新のAPIというあたりから勉強不足でよくわからないのですが、 どうしたらいいのでしょうか? よろしくおねがいします

    • ベストアンサー
    • PHP
  • of  の使い方

    (彼女はかなりの身分に違いない。) She must be of high-rank. 上記の英文なのですが、普通に考えると「of」をやめて She must be a high-rank.としても意味は通ります。She must be a high-rank.の方が僕にはわかりやすいのですが、どうして「of」が使われたのでしょう?名詞の前に「of」をつけると形容詞になる、と聞いた事があるのですが、She must be a high-rank.は「of」がつくことでニュアンスはどう変わるのでしょう、教えて下さい。

専門家に質問してみよう