@@ -115,11 +115,7 @@ public function getDescription()
115
115
*/
116
116
public function getUrl ()
117
117
{
118
- if ($ this ->isPost ) {
119
- return $ this ->request ->startingUrl ->getUrl ();
120
- }
121
-
122
- return $ this ->api ->get ('url ' ) ?: $ this ->request ->startingUrl ->getUrl ();
118
+ return $ this ->api ->get ('url ' ) ?: parent ::getUrl ();
123
119
}
124
120
125
121
/**
@@ -134,41 +130,39 @@ public function getCode()
134
130
var js, fjs = d.getElementsByTagName(s)[0];
135
131
if (d.getElementById(id)) return;
136
132
js = d.createElement(s); js.id = id;
137
- js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0 ";
133
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3 ";
138
134
fjs.parentNode.insertBefore(js, fjs);
139
135
}(document, 'script', 'facebook-jssdk'));</script>
140
136
141
- <div class="fb-post" data-href=" {$ this ->url }" data-width="500 "></div>
137
+ <div class="fb-post" data-href=" {$ this ->url }" data-width=" { $ this -> width } "></div>
142
138
EOT ;
143
139
}
144
140
}
145
141
146
142
/**
147
143
* {@inheritdoc}
148
144
*/
149
- public function getProviderName ()
145
+ public function getWidth ()
150
146
{
151
- return 'Facebook ' ;
147
+ if ($ this ->isPost ) {
148
+ return 500 ;
149
+ }
152
150
}
153
151
154
152
/**
155
153
* {@inheritdoc}
156
154
*/
157
- public function getAuthorName ()
155
+ public function getProviderName ()
158
156
{
159
- return $ this -> api -> get ( ' username ' ) ?: parent :: getAuthorName () ;
157
+ return ' Facebook ' ;
160
158
}
161
159
162
160
/**
163
161
* {@inheritdoc}
164
162
*/
165
- public function getSource ()
163
+ public function getAuthorName ()
166
164
{
167
- $ id = $ this ->api ->get ('id ' );
168
-
169
- if (!empty ($ id )) {
170
- return 'https://www.facebook.com/feeds/page.php?id= ' .$ id .'&format=rss20 ' ;
171
- }
165
+ return $ this ->api ->get ('username ' ) ?: parent ::getAuthorName ();
172
166
}
173
167
174
168
/**
0 commit comments