jorenvh / laravel-share

Optional package for Laravel to generate social share links.
MIT License
529 stars 88 forks source link

facebook error "href should represent a valid URL" and twitter not showing url at all only error only when server live #31

Closed jordantsap closed 5 years ago

jordantsap commented 5 years ago

Thats odd! I have this code in my blade file: `

        <div class="col-xs-3"><a target="_blank" href="https://plus.google.com/share?url={{url()->current()}}" class="social-button " id=""><span class="fa fa-google-plus fa-3x"></span></a></div>
        <div class="col-xs-3"><a target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url={{url()->current()}}" class="social-button " id=""><span class="fa fa-linkedin fa-3x"></span></a></div>`

localhost works fine as expected but when i upload the blade file into live server it gives me facebook error "href should represent a valid URL" and sharing in twitter it navigates to share view but not including any url at all. Google + and linkeed works as expected

desktop screensphot

desktop screenshot

BruceLampson commented 5 years ago

Looks like the request is being made through SSL termination. Your protocol schema is //

jorenvh commented 5 years ago

Seems like you are using it in a wrong way

{{url()->current()}}

generates all the boilerplate for you, you are adding it an existing url and are specifying any provider(s)

jorenvh commented 5 years ago

Closing this due to inactivity

shadahmedshahadot commented 3 years ago

what is the right way?