Community

Forums » SEPHP Help and Tips

Profile Question | Twitter Broken ?

    • 159 posts
    November 13, 2018 2:19 PM EST

    On my site and the SE demo the twitter question appears not to be working.

    Example

    The Facebook question adds the URL https://www.facebook.com/ before username

    If you add just your Facebook username it resolves.

    YouTube and others are the same except Twitter

    For Twitter nothing resolves to your username 

    Adding just your username results in this:

    https://www.twitter.com/#!/username 

    Adding username and @ still won't resolve to your twitter profile.

    Adding the full URL won't resolve either.

    How can I remove the #! to make it work or perhaps I am missing something

    • 2607 posts
    November 14, 2018 4:01 AM EST

    It works for me https://demo.socialengine.com/profile/ChiefEvangelist using the Twitter url to my profile at Twitter.

    • 159 posts
    November 14, 2018 7:25 AM EST

    I tested the ChiefEvangelist it does not resolve to your twitter URL. 

    To properly test you must be logged into another user's account

    Although it displays the correct URL the link is not correct

    See the URL link SE creates below why the #! (I think thats outdated)

    https://www.twitter.com/#!/username


    This post was edited by Miami Shade at November 14, 2018 7:45 AM EST
    • 159 posts
    November 14, 2018 7:53 AM EST

    Ideally it should be like all other profile questions - you just add the username the website adds the correct URL in the link but only the username is displayed. I thought that is why they are built in social media site profile questions.

    Example: YouTube 

    Enter just your YouTube username and the website automatically adds the link https://www.youtube.com/user/ before your username to allow for a nice display.

    Example: Facebook

    Enter just your Facebook username and the website automatically adds the link https://www.facebook.com/ before your username to allow for a nice display.

    I think I just need to edit the file that has the bad URL with #! 

    On the hunt for it smile


    This post was edited by Miami Shade at November 14, 2018 8:30 AM EST
    • 2607 posts
    November 14, 2018 8:30 AM EST

    I realize that but it works for me as a guest too even if not logged in. Are you saying it only doesn't work if you are logged into the site as someone else and that testing as a guest or as your own user works fine? Does it work for you here, https://community.socialengine.com/profile/ChiefEvangelist ?

    Here's a video of it working for me from the demo as the url resolves at Twitter's end of things. https://demo.socialengine.com/videos/1/10/twitter

    • 159 posts
    November 14, 2018 8:37 AM EST

    Good morning Donna smile

    Nope not working for me on any browser and I checked multiple SE sites all resolve to twitter.com because of the #! in the URL.

    In your video are you logged in? Did you clear cache?

    Your URL link has the #! too

    Why the #!

    Another mystery to solve (I Don't think it could be a local issue do you )


    This post was edited by Miami Shade at November 14, 2018 8:38 AM EST
    • 2607 posts
    November 14, 2018 8:39 AM EST

    Yes I am logged in here. I also tried as a guest and I get the same as shown in the video. I'll try your profile here if you filled in twitter.

    • 2607 posts
    November 14, 2018 8:40 AM EST

     BTW, yes I know about the url as that used to be how it was formatted but even with that url, it works for me. I will try logging in as another user.

    • 159 posts
    November 14, 2018 8:41 AM EST

    I added my twitter 

    • 159 posts
    November 14, 2018 8:42 AM EST

    I got it backwards if you are logged in it won't resolve for me. Is that not the old sharing method #!


    This post was edited by Miami Shade at November 14, 2018 8:43 AM EST
    • 1 posts
    November 14, 2018 8:43 AM EST

    I tested on your profile here where you added twitter and I end up on your twitter page from this account. I figured to try as a normal user account. I can post a pic of your twitter page if you need me to but the redirect is working fine for me.

    • 2607 posts
    November 14, 2018 8:44 AM EST

     It also works when trying as admin, just to see. I can't try as guest here as all profiles are private from guest view.

    • 159 posts
    November 14, 2018 8:46 AM EST

    OK thanks so much for your effort in my home network is protected by BitDefender that's my only guess so far as to why I cant get it to work yet.  


    This post was edited by Miami Shade at November 14, 2018 8:46 AM EST
    • 2607 posts
    November 14, 2018 8:52 AM EST

    Mine is too. 


    application/modules/Fields/View/Helper/FieldTwitter.php

    lines 24 and 26

    $regex = '/^((http(s|):\/\/|)(www\.|)|)twitter\.com\/(#!|)/i'; $username = preg_replace($regex, '', trim($value->value)); $twitterUrl = 'https://www.twitter.com/#!/' . $username;

     

    Not sure what will happen if you change it but please let everyone know what you do if it works. Thx. 

    • 159 posts
    November 14, 2018 9:11 AM EST

    I guess it could also be my CloudFlare thanks for that file I will fiddle and let you know 

    • 2607 posts
    November 15, 2018 4:48 AM EST

    I've heard of a lot of issues lately with google and also cloudflare. I even had trouble loading the SE sites due to "dns" issues. Noting that nothing had changed but in researching it appears many are having these issues. Most are pointing to issues with cloudflare and/or google services such as ads, analytics, etc.


    This post was edited by Donna at November 15, 2018 4:48 AM EST