]> git.mxchange.org Git - friendica.git/blobdiff - include/Scrape.php
Merge https://github.com/friendica/friendica into pull
[friendica.git] / include / Scrape.php
index 4f53effe92b3653ea99a2688a2484736721af7bd..cd88aceb7cfb691bb30445fcf0f50f74c3587dc2 100644 (file)
@@ -394,7 +394,10 @@ function probe_url($url, $mode = PROBE_NORMAL) {
                                }
                                if($link['@attributes']['rel'] === 'diaspora-public-key') {
                                        $diaspora_key = base64_decode(unamp($link['@attributes']['href']));
-                                       $pubkey = rsatopem($diaspora_key);
+                                       if(strstr($diaspora_key,'RSA '))
+                                               $pubkey = rsatopem($diaspora_key);
+                                       else
+                                               $pubkey = $diaspora_key;
                                        $diaspora = true;
                                }
                        }
@@ -432,7 +435,7 @@ function probe_url($url, $mode = PROBE_NORMAL) {
                                        intval(local_user())
                                );
                                if(count($x) && count($r)) {
-                                   $mailbox = construct_mailbox_name($r[0]);
+                                       $mailbox = construct_mailbox_name($r[0]);
                                        $password = '';
                                        openssl_private_decrypt(hex2bin($r[0]['pass']),$password,$x[0]['prvkey']);
                                        $mbox = email_connect($mailbox,$r[0]['user'],$password);
@@ -560,9 +563,10 @@ function probe_url($url, $mode = PROBE_NORMAL) {
                        else
                                $poll = $tapi . '?screen_name=' . $tid;
                        $profile = 'http://twitter.com/#!/' . $tid;
-                       $vcard['photo'] = 'https://api.twitter.com/1/users/profile_image/' . $tid;
+                       //$vcard['photo'] = 'https://api.twitter.com/1/users/profile_image/' . $tid;
+                       $vcard['photo'] = 'https://api.twitter.com/1/users/profile_image?screen_name=' . $tid . '&size=bigger';
                        $vcard['nick'] = $tid;
-                       $vcard['fn'] = $tid . '@twitter';
+                       $vcard['fn'] = $tid;
                }
 
                if($lastfm) {