I have implemented the Facebook Like and Send button plugin. Look I think its fair to say that this should be fairly straightforward and having stepped though the process I was very happy that this was the case.
I am having an issue now that is causing me some difficulty resolving.
The issue is around an inconsistent display and functionality of the plugin. It works perfectly for some of our site pages and doesnt work at all for others.
On the pages where the plugin does not work the Send Button doesnt appear and when the Like Button is clicked it opens the Like Dialog very briefly and immediately closes it without any Like Action being recorded
I have checked all of the site pages through the Facebook Debugger tool and all the pages are being scraped correctly with correct Open Graph Meta Tags etc...
At this stage I am wondering if anybody has had this issue? I am aware that there were issues with the Send Button this year but my understanding was that these issues had been resolved...
website url that displays incorrectly is: http://www.todaysdeals.ie/Deal.aspx?dlid=441
website url that displays correctly is: http://www.todaysdeals.ie/Deal.aspx?dlid=439
It looks to me like the problem is in how you're declaring the button code. You've specified a width of 90px in the FBXML code, but Facebook seems to be ignoring this and rendering its code at 150px.
My guess is on the incorrect page, you've got a large number of likes on this page, and it's wrapping the buttons into a hidden area of the div.
I'd start by increasing the width in your FBXML code to at least 176px and see what happens.
Related
I tried WebBrowser but any solution related to WebBrowser I find uses the exact same codes, WebBrowser.DrawToBitmap
Problem with that is, it gives out inaccurate results depending on URL, to what page actually would look like, sometimes even blank pages.
So I am looking for any alternate solution to WebBrowser if there is any.
It needs to run in background, as in not open any browser on screen, render it in background with all scripts and get an image.
If I understand what you're trying to do, you might be interested in a framework called PhantomJS, which is a WebKit "browser" engine which runs the pages without visually rendering them. It can be used to capture screens.
Now this technique requires JavaScript, but there is something called Selenium WebDriver to help you wrapping that. Users here at SO posted a simple example and this comment looks useful as it contains the list of required Packages.
I have a scraper that scrapes data from three kinds of websites.
One of those websites (Facebook) have multiple page formats that needs to be scraped.
While two websites work fine, one particular Facebook page layout refuses to work or work very strangely. (for other Facebook page layouts I haven't noticed this behavior)
I am reading each link from a file and load into webbrowser control, I wait until each page fully loads (using AutoResetEvent) and then after it loads, I send pages html to other class from the webbrowser_Document_Completed event to do the scraping.
The problem here is that sometimes page is not fully loaded and sometimes it fully loads.
In both cases webcontrol_Document_Completed is fired.
When the page fully loads, it works just fine.
I debugged and indeed, page is not fully loaded and data is missing.
It can pass 4-5 times in a row to fully load the page and then suddenly stops. (random pattern)
I don't know anymore where to look for the culprit.
I thought that my code is not ok so I created new test project that just loads that page and same problem occurs.
So maybe the page is the problem because I also saw that when it doesn't work, needed data is commented.
Maybe some scrape protection...
Page in question is: https://www.facebook.com/pages/Childrens-Dental-Care/76095547112?v=info&viewas=0 and needs to scrape right side of the page where is Joined Facebook, Hours and Parking.
It's //td[#class='data'] element that I need.
If you have any idea that might point to solving this issue...
Thank you!
I do the following navigation pattern:
Navigate into the app (and it's main view)
Go into a detail view that fetches something from a REST server (that is - it shows a progress indicator for a few seconds)
While progress indicator still is shown, I click the back-button twice in quick succession (easy to do by mistake)
The app returns to the main view, but with the content of the detail view superimposed on it.
A screenshot of the resulting mess is shown below.
This was recreated both on a Nokia Lumia 800 and HTC Titan.
First of all - what the h..? And is there anything I could have done to make this happen?
There is no exceptions (or anything else) shown in the output. The only thing happening in the OnNavigatedFrom() method of the detail view is nulling out the background image (for memory reasons). It happens in other views as well.
My idea is that the draw method on both views are called on different threads, leaving only the main view to be responsive.
Any idea as to what has happened here, and how I can fix this bug?
This type of issue happened to me when using TransitionFrame from Silverlight for Windows Phone toolkit. Using transitions when navigating from page to page can cause this if the user taps on back button once or twice while the transition/navigation is in progress.
I believe it's a bug, but couldn't find it reported at the official CodePlex site of the toolkit, therefore I don't know about any reliable solution or workaround except trying to handle the back button press on the page that's causing issues. In other words, catching the back button/key press and either disabling it (I'm not sure that this would pass certification!), or simply prompting user with a MessageBox that the page is still loading and if they are sure that they want to navigate back, might work for you.
Other solution I can think of is that you avoid using TransitionFrame, but that's not really a solution, right? :)
I have a web application, in which browser's back button functionality should be customized. It's like, whenever we click on browser's back button, it should take us to landing page(Login page), It should display error message saying that 'session expired. Please login again'.
I have gone through so many posts and even in stack overflow also, i saw few posts. But nothing worked for me. The java script approach i am using as a temporary workaround.Basically this JavaScript never allow us to go back. instead it will keep us in same page.
JavaScript i have used <script>history.go(1)</script>
Please help me to customize the functionality of Browser's back button.
Any suggestions will be really helpful to me.
Short answer: You cannot
A little longer: You shouldn't even try.
But if you insist: A Thorough Examination of "Disabling the Back Button." (from 2000, but since it is ASP I guess still valid for you :)
Newer dot net: Restrict user go back to previous page after signout
Ignore the older browsers do not support location.replace - IE3.2 is not considered older any more but ancient.
For this - you would need a custom solution and disabling back button will not help...
Usually you should not try to change the behavior of back button. But since this is the requirement, I would suggest the following:
Approach 1:
This calls for creating a navigation framework where you know which is the current page in the flow... This is only possible if you a sequence in which the pages will be called (like a wizard)
Approach 2:
Specific to your case : You can use jquery/javascript to identify if the back button is clicked.. If it is then you can do an ajax call to server to kill the session and then redirect the user to login page.
You can programmatically manipulate browser history using something like this:
window.history.back();
window.history.forward();
window.history.go(2); etc.
In HTML5 ready modern browsers like Chrome you can also do more advanced things including completely overwriting back button functionality using history.pushState() and history.replaceState() methods.
(https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history)
You can also go dirty and use javascript + ajax calls to react specifically to back button events, but this will also not work on some browsers. What you ask is not a native part of a web, so no matter what you will decide to use in the end, it wont be very easy or widely supported.
I have a website where there is a lengthy list of items to display so I am using Pagination to make the load on server easier.
However, I am doing the pagination via Ajax so when the user clicks on Next Page or Previous Page linkbutton, the data repeater is refreshed with ajax.
This was working fine until, people started to click on the item and then click back, it takes them to the first page.
suppose you scan about 10 pages, by clicking on the "Next Page" button. The data changes, but the URL in the browser doesnt. And you think you found what you want so you click on it, the browser loads different page, and when you click back, the browser takes you to previous page but since the url did not change, you are back to page 1.
Currently, I have removed ajax so the url changes everytime, but I have seen several website re-write the url in browser when ajax even happens, and I was wondering if I could do the same.
Google search for url re-write digs up only seo routing stuff, nothing on what I actually want (i am sure i am not using the right words)
I was interested to know this problem, any clues or leads on this one?
thanks!
ps: several questions here were kind of close, but was either too complicated or too deviated. sorry if its a duplicate.
The only part of an URL that you can change in js, client-side, without forcing browser to reload whole page is an anchor part (http://domain/page#anchor - the part after # sign). This part is used by many js application (e.g. Google Picassa), also by silverlight to provide browser history support. You'd have to set an anchor part when navigating to another page of your data. When the page is loaded, just check the anchor part and load appropriate page. Also, you'd have to periodically check for changes - this will happen when user uses back/forward feature in his/her browser. (There could be an event that is fired when that happens, I just haven't found it)