Ok i got an idea of the problem:
the correct wat to display a twitter widget (according to the twitter website) is:
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 4,
interval: 6000,
width: 250,
height: 300,
theme: {
shell: {
background: '#333333',
color: '#ffffff'
},
tweets: {
background: '#000000',
color: '#ffffff',
links: '#4aed05'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'}}).render().setUser('usernameHere').start();
</script>
The ouput of the SS TwitterWidgetPack is:
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
"version":2,"type":"profile","rpp":"10","interval":"600","width":"auto","height":"600","theme":{"shell":{"background":"#EAEAEA","color":"#000000"},"tweets":{"background":"#ffffff","color":"#000000","links":"#0099FF"}},"features":{"scrollbar":false,"loop":false,"live":false,"hashtags":false,"timestamp":true,"avatars":false,"behavior":"default"}}).render().setUser('usernameHere').start();
</script>
The php file with the code says:
function WidgetSetupJSON() {
$settings = $this->WidgetSetup();
return Convert::raw2json($settings);
}
Question:
- Is there a way to convert an array to version = 2, instead of "version"= 2
thx