Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel the second parameter of the passed URL is not shown while sharing with social media #104

Open
Khsed4 opened this issue Aug 20, 2023 · 0 comments

Comments

@Khsed4
Copy link

Khsed4 commented Aug 20, 2023

I'm using this library for a Laravel project. It works well except it doesn't work while adding multiple parameters to the URL which is going to be shared.

     public function ShareWidget(Request $request)
    {

        $shareURL =  url('/') . '/newproducts' . '?' . http_build_query([
            'catalog' => $request->catalog,
            'category' => $request->category
        ]);


        $shareComponent = ShareFacade::page(
            $shareURL,
            null,
        )
            ->facebook()
            ->telegram()
            ->whatsapp();
        return view('share-component', compact('shareComponent'));
    }

The ShareWidget function is responsible to make a URL and share it with the users on social medias. While I print out the ShareURL it shows what's supposed to be: [(http://127.0.0.1:8000/newproducts?catalog=1&category=11)].

However, when its comes to the final stage which is the link that had been shared with users on social medias it misses the second parameter. No matter what it is. [(http://127.0.0.1:8000/newproducts?catalog=1)].

As you see &category=11 part is missed in the second one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant