The following error appears when trying to add Twitter: Formatted tweet field to a view.

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /?q=admin/structure/views/view/site_tweets/preview/page_all_tweets/ajax
StatusText: Service unavailable (with message)
The following error appears when trying to add Twitter: Formatted tweet field to a view.

ResponseText: PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type numeric: "htcluster"
LINE 3: WHERE twitter_uid = 'htcluster'
^: SELECT *
FROM {twitter_account}
WHERE twitter_uid = :id
OR screen_name = :id; Array
(
[:id] => htcluster
)
in twitter_account_load() (line 83 of /opt/drupal-7.17/modules/twitter/twitter.inc)

Comments

juampynr’s picture

Seems you are giving the screen_name to that query instead of the Twitter ID (a numeric ID that Twitter uses to identify your Twitter Profile).

testplatform’s picture

Yes, this is what the message is saying. But how can I change it?

testplatform’s picture

Title: Error when Twitter: Formatted tweet field to view » Error when adding Twitter: Formatted tweet field to view
testplatform’s picture

Other types of twitter fields can be added fine. Only Twitter: Formatted tweet shows this error and does not work.

juampynr’s picture

twitter_uid is a number. If you want to filter Tweets, you should use field Screen name.

liquidcms’s picture

i am using Formatted tweet field with 6.0-alpha2 and i do not see the errors you mention.

however, the links are all missing the twitter_id value:
https://twitter.com/intent/retweet?tweet_id=&original_referer=http://qa....

dgeo’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Same here. just use a numeric ID :)