0

I want to add tab in my business page for angular2 site. For that I follow that steps :-

 https://blog.hubspot.com/blog/tabid/6307/bid/26330/how-to-create-custom-tabs-for-facebook-business-pages.aspx

when I click on that particular tab its showing "can not Post error message" and when I try to hit this link :-

 http://www.facebook.com/dialog/pagetab?app_id=12345678901234&next=https://www.aaa.com/#!/home

its remove home from this link and create that new link :- https://www.aaa.com/#= and this link is not valid for my site.

Please tell me what I can do for angular2 site

Mangita
  • 595
  • 6
  • 24

1 Answers1

0

its remove home from this link and create that new link :- https://www.aaa.com/#= and this link is not valid for my site.

You did not properly URL-encode the value - so the #!/home part belongs to the “outer” URL.

&next=https%3A%2F%2Fwww.aaa.com%2F%23%21%2Fhome

is what your URL to call the Page Tab add dialog should end with.

misorude
  • 3,381
  • 2
  • 9
  • 16
  • you means I should do url encode firstly http://www.facebook.com/dialog/pagetab?app_id=12345677&next=https%3A%2F%2Fwww.aaa.com%2F%23%21%2Fhome – Mangita Aug 29 '18 at 06:52
  • I tried this but its showing :-This dialog has been passed a bad parameter. API Error Code: 100 API Error Description: Invalid parameter Error Message: redirect_uri should represent a valid URL – Mangita Aug 29 '18 at 06:53
  • The parameter name needs to be `redirect_uri` now, according to documentation, and not `next`. – misorude Aug 29 '18 at 06:54
  • please can you me example where I should add the parameter, Thank you – Mangita Aug 29 '18 at 06:56
  • Replace `next` with `redirect_uri` … – misorude Aug 29 '18 at 06:59
  • I replaced and tried it but its showing same error message – Mangita Aug 29 '18 at 07:00
  • Please check http://www.facebook.com/dialog/pagetab?app_id=12345678&redirect_uri=https%3A%2F%2www.jadwalak.com%2F%23%21%2Fhome – Mangita Aug 29 '18 at 07:03
  • Now you have encoded the parameter value _twice_ … It needs to be `&redirect_uri=https%3A%2F%2Fwww.jadwalak.com%2F%23%21%2Fhome` – misorude Aug 29 '18 at 07:09
  • Now its showing this error message:- API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: redirect_uri is not owned by the application. – Mangita Aug 29 '18 at 07:11
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/178996/discussion-between-mangita-and-misorude). – Mangita Aug 29 '18 at 07:15
  • It needs to be a URL that “belongs” to your app. It must at least match your app domain. – misorude Aug 29 '18 at 07:15