473,396 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problem with facebook app

78
How to remove ?ref=nf from images in feed. Now it looks like http://www.domain.com/117?ref=nf. I want to remove ?ref=nf from that.
Oct 3 '12 #1
11 2388
Expand|Select|Wrap|Line Numbers
  1. $url = "http://www.domain.com/117?ref=nf";
  2.  
  3. echo substr($url, 0, -7);
Oct 3 '12 #2
Ammu
78
I have checked with this code. But showing same error again.
Oct 4 '12 #3
Rabbit
12,516 Expert Mod 8TB
What error? You never said anything about an error.
Oct 4 '12 #4
Ammu
78
actually now my url looks like http://www.domain.com/117?ref=nf.
But I want http://www.domain.com/117 only.
Oct 5 '12 #5
Rabbit
12,516 Expert Mod 8TB
You give us no error and no code to work from, how do you expect us to help?
Oct 5 '12 #6
Ammu
78
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. $(document).ready(function(){
  3. $('#share_button').live('click', function(e){
  4. e.preventDefault();
  5. FB.ui(
  6. {
  7. method: 'feed',
  8. name: 'title',
  9. link: 'http://www.domain.com/',
  10. picture: 'http://www.domain.com/public/images/logo.png',
  11. caption: 'Visit Site
  12. description: '<a href=www.domain.com>Domain</a>',
  13.  
  14. message: ''
  15. });
  16. });
  17. });
  18. </script>
  19.  
  20.  
This code for facebook share
Oct 9 '12 #7
Rabbit
12,516 Expert Mod 8TB
I see no reference anywhere in your code to http://www.domain.com/117.
Oct 9 '12 #8
Are you using jQuery correctly?
Have you included the necessary files?
Have you tried console debugging?
Where's your PHP code?
Do you need the javascript equivelant of substr()?
Where's your reference to http://www.domain.com/117?ref=nf ?
What error are you getting?
Where's your error output?

Are you trolling hard right now?
You mad bro?
Oct 9 '12 #9
Ammu
78
Expand|Select|Wrap|Line Numbers
  1. <script>
  2.   window.fbAsyncInit = function() {
  3.     FB.init({
  4.       appId  : '455892144786652',
  5.       $app_secret : '95d5fg52g45gh1445565d459g544',
  6.       status : true, 
  7.       cookie : true, 
  8.       xfbml  : true  
  9.     });
  10.   };
  11.  
  12.   (function() {
  13.     var e = document.createElement('script');
  14.     e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
  15.     e.async = true;
  16.     document.getElementById('fb-root').appendChild(e);
  17.   }());
  18. </script>
  19.  
  20. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
  21. <img id ="share_button" src="http://www.domain.com/public/images/facebook.jpg">
  22. <? $link2face='http://www.domain.com/articles/25/title'; 
  23. $link2face=str_replace("?ref=nf","",$link2face);
  24. ?>
  25. <script type="text/javascript">
  26. $(document).ready(function(){
  27. $('#share_button').live('click', function(e){
  28. e.preventDefault();
  29. FB.ui(
  30. {
  31. method: 'feed',
  32. name: '<?php echo 'title'; ?>',
  33. link: '<? echo 'http://www.domain.com/'; ?>',
  34. picture: 'http://www.domain.com/uploads/image1.png',
  35. caption: 'Visit Domain Name',
  36. description: '<a href=www.domain.com>Domain</a>',
  37. message: ''
  38. });
  39. });
  40. });
  41. </script>
  42.  
This is my code for facebook share. When I click on article it is successfully posted on my ( facebook )wall. It displays Image with title. When i click on title from my face book post it directly go to particular page .At that time url is correct. ( http://www.domain.com/articles/25/title ).
When i click on image it also going to particular page but url will be http://www.domain.com/articles/25/title?ref=nf .
I mean there is an extension (ref=nf) after my original url . so it is affected my routing and page shows error.
Oct 18 '12 #10
Dormilich
8,658 Expert Mod 8TB
I mean there is an extension (ref=nf) after my original url . so it is affected my routing and page shows error.
1) that’s not an extension, that’s an URL query string.
2) and what would that page error be?
Oct 18 '12 #11
Ammu
78
Expand|Select|Wrap|Line Numbers
  1. $route['articles/(:num)/(:any)']= 'articles/description/$1/$2';
  2.  
my routing file look like this.
In my url , it should be http://www.domain.com/articles/25/title.
otherwise page will ot display or display with some errors. just i need to remove that query string("ref=nf").
Oct 18 '12 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: mfasoccer | last post by:
Hey guys I'm writing a facebook bot program. Currently I am stuck at the login screen. My approach was to take a password and convert it to md5 along with the challenge parameter that you will...
0
by: Dutt | last post by:
You know how Facebook is getting popularity nowadays. If you are really interested about facebook and you are .NET professional, I know the options provided by facebook web application are not...
1
by: reblace | last post by:
I'm trying to translate the following: <?xml version="1.0" encoding="UTF-8"?> <users_getInfo_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
8
by: gamazone | last post by:
hi to all is it possible to auto fill and auto login the facebook login form? i am developing a web application in which , user will in put his,say for facebook, login information in his home...
1
semanticnotion
by: semanticnotion | last post by:
I want to integrate my site to Facebook login system. I google it and at last I find this great tutorial.http://thinkdiff.net/facebook/php-sdk-graph-api-base-facebook-connect-tutorial/ But there...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.